mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
#1587 Adopt editor.formatOnSave to respect language based settings
This commit is contained in:
@@ -140,13 +140,12 @@ class FormatOnSaveParticipant implements INamedSaveParticpant {
|
||||
|
||||
participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise<any> {
|
||||
|
||||
const model = editorModel.textEditorModel;
|
||||
if (env.reason === SaveReason.AUTO
|
||||
|| !this._configurationService.lookup('editor.formatOnSave').value) {
|
||||
|
||||
|| !this._configurationService.lookup('editor.formatOnSave', model.getLanguageIdentifier().language).value) {
|
||||
return;
|
||||
}
|
||||
|
||||
const model = editorModel.textEditorModel;
|
||||
const versionNow = model.getVersionId();
|
||||
const {tabSize, insertSpaces} = model.getOptions();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user