files.trimTrailingWhitespace: is now an overridable setting

This commit is contained in:
Benjamin Pasero
2017-01-19 16:14:37 +01:00
parent a5744684f0
commit 7611715313
2 changed files with 3 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ class TrimWhitespaceParticipant implements INamedSaveParticpant {
}
public participate(model: ITextFileEditorModel, env: { reason: SaveReason }): any {
if (this.configurationService.lookup('files.trimTrailingWhitespace').value) {
if (this.configurationService.lookup('files.trimTrailingWhitespace', model.textEditorModel.getLanguageIdentifier().language).value) {
this.doTrimTrailingWhitespace(model.textEditorModel, env.reason === SaveReason.AUTO);
}
}