While trying to come up with an alternative solution to #78, I noticed an odd thing. This is not working as I expect, but perhaps this is working as intended...
For the use case in #78, I had to override "exclude_syntaxes" for a particular formatter (Prettier). I found that if I just set my settings as:
"Formatter":
{
"formatters": {
"prettier": {
"enable": true,
"format_on_save": true,
"exclude_syntaxes": {
"html": ["jinja"],
},
},
}
}
The formatter would not run (and running it manually triggered as Syntax out of the scope error). After a bit of trial and error, I found that I had to override both "syntaxes" and "exclude_syntaxes". I didn't need to change the value of "syntaxes", just copying the default value worked.
I expected the override logic to work like this:
- Load the default package settings for
"prettier".
- Merge any overrides from my global User settings file (across projects).
- Merge any overrides from my project settings file (project-specific).
- The result are the settings to use.
Is this not what is supposed to happen?
While trying to come up with an alternative solution to #78, I noticed an odd thing. This is not working as I expect, but perhaps this is working as intended...
For the use case in #78, I had to override
"exclude_syntaxes"for a particular formatter (Prettier). I found that if I just set my settings as:The formatter would not run (and running it manually triggered as
Syntax out of the scopeerror). After a bit of trial and error, I found that I had to override both"syntaxes"and"exclude_syntaxes". I didn't need to change the value of"syntaxes", just copying the default value worked.I expected the override logic to work like this:
"prettier".Is this not what is supposed to happen?