You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some editor settings are not being respected by language #19511
Reacted by Igor Novozhilov, katainaka, Rodrigo Stuchi, Stephen Davies, ibeex, Montegasppα ℭacilhας, Jaime Pillora, Nolan Sedley, Faith, Per Lundberg and 3 more
Above settings comes from the Model and are created/updated by the modelService. Fixing this need adoption in modelService to language based changes to configurations.
I'm currently unable to avoid auto-save indentation of 4 spaces for my .js files.
I tried everything. Disabled all linter extensions. Configuring .vscode/settings.json
Added the same for my preferences/user settings file:
// Place your settings in this file to overwrite the default settings
{
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.formatOnSave": false,
"typescript.check.tscVersion": false,
"window.zoomLevel": 0,
"files.trimTrailingWhitespace": true,
"npm.validate.enable": false,
"editor.minimap.enabled": true,
"workbench.iconTheme": "vscode-icons",
"[javascript]": {
"editor.tabSize": 2
}
}
Still it auto-indents on every save to 4 spaces! Is there any way to get around this on the current release? Or is it some extension playing tricks on me?
I just encountered the same trap, and Kristian Mandrup (@kristianmandrup) is right.
For those installed JS-CSS-HTML Formatter extension, please check Formatter Config (via Command Palette), especially, the following (default) settings:
Activity
sandy081 commentedon Jan 27, 2017
Above settings comes from the Model and are created/updated by the modelService. Fixing this need adoption in modelService to language based changes to configurations.
9 remaining items
#19511 Define and use ITextSource2
sandy081 commentedon Feb 6, 2017
@mdalpi Please let me know the use case behind supporting
files.excludein the list? Also please create a separate issue for that. Thanks.kristianmandrup commentedon Mar 7, 2017
I'm currently unable to avoid auto-save indentation of 4 spaces for my
.jsfiles.I tried everything. Disabled all linter extensions. Configuring
.vscode/settings.json{ "vsicons.presets.angular": false, "editor.tabSize": 2, "editor.detectIndentation": false, "editor.formatOnSave": false }Added the same for my
preferences/user settingsfile:Still it auto-indents on every save to 4 spaces! Is there any way to get around this on the current release? Or is it some extension playing tricks on me?
sandy081 commentedon Mar 7, 2017
Kristian Mandrup (@kristianmandrup) You can try disabling all extensions, with vanilla VS Code, do following
.vscode/settings.jsonAbove user settings will have tab size to 2 for all files. To do just for javascript files have following in user settings
Let me know if above works for you?
kristianmandrup commentedon Mar 7, 2017
This is exactly what I tried (see above), except disabling all my extensions. Thanks anyways.
sandy081 commentedon Mar 7, 2017
can you try disabling extensions and see if it works?
kristianmandrup commentedon Mar 7, 2017
Turned out the vscode-JS-CSS-HTML-formatter extension was to blame. Solved now! Thanks
ryenus commentedon Aug 20, 2017
I just encountered the same trap, and Kristian Mandrup (@kristianmandrup) is right.
For those installed JS-CSS-HTML Formatter extension, please check Formatter Config (via Command Palette), especially, the following (default) settings:
Earl-Brown commentedon Oct 12, 2017
Sandeep Somavarapu (@sandy081) - the editor.detectIndentation trick worked for me. Thanks!