-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workspace does not respect editor.formatOnSave
config from folder settings
#49708
Comments
If you disable prettier and eslint, does the built-in JavaScript and TypeScript formatter get run in this case? |
Hi all, same problem here Code OS: Microsoft Windows 10 Enterprise Installed extensions: Steps to Reproduce: Set this json in {
"editor.formatOnSave": true,
"editor.trimAutoWhitespace": true,
"html.format.wrapAttributes": "force-aligned",
"html.format.contentUnformatted": "pre",
"html.autoClosingTags": true,
"[javascript]": {
"editor.formatOnSave": false,
},
"[html]": {
"editor.tabSize": 2,
"editor.detectIndentation": false
},
"[mustache]": {
"editor.tabSize": 2,
"editor.detectIndentation": false
}
} Create sample JavaScript file and HTML
Write some HTML and JavaScript Save files Observerd behaviour: Expected behaviour: If I use this folder settings in the workspace settings |
Same here. |
When opening the folder directly, it is working as expected. Hence there is no problem with the settings itself. |
@mjbvz What other info do you need in order to investigate this issue? |
@sandy081 This is how I ask for the configuration, I think that's correct: https://github.com/Microsoft/vscode/blob/63102e94c3e05d34e205f1b56496bb253c8b2ce4/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts#L208 |
Looks correct |
Looks like override identifier settings are not working in folder settings. |
Steps to Reproduce:
Prettier - Code Formatter
with ESLint extensions in this case to format.Observed Behaviour: File does not format on save.
Expected Behaviour: File formats on save, as file settings are meant to override workspace settings
Does this issue occur when all extensions are disabled?: Irrelevant, since this is tied to extensions formatting on save.
NOTE: The only way I can work around this is by copying the following subset of my folder settings into my workspace settings:
The text was updated successfully, but these errors were encountered: