The Vetur default formatter settings are set to everything being prettier, except for Sass, and Stylus, which are set to sass-formatter and stylys-formatter respectively.
Then I also have vetur.format.enable set to true.
What now has me confused is that I did try the formatter settings mentioned earlier, saw it was causing conflicts so I uninstalled the extensions and removed those settings, and it is still causing conflicts. So I ended up getting really confused as to what could be happening now even after changing the settings back to what I had.
I'm a little late to the convo but just came across this and it popped into my head... what is the value of editor.defaultFormatter in your VS Code settings.json by itself, assuming it is defined?
Because according to the docs, whatever formatter is thus defined will override all other directives in the event of a conflict, assuming no language specific constraints.
Editor: Default Formatter
Defines a default formatter which takes precedence over all other formatter settings. Must be the identifier of an extension contributing a formatter.
I may be wrong, but I've always understood that to mean if defined, that configuration will have the last word no matter what.
Well this is a really good thing to be aware of - mine is set to none (and working).
I'll also note that recently I had an issue where when copying my prettierrc and eslintrc.js files from one VS Code window to a new project's window required a restart (Code & Yarn) before it picked up with changes properly.
The Vetur default formatter settings are set to everything being prettier, except for Sass, and Stylus, which are set to
sass-formatter
andstylys-formatter
respectively.Then I also have
vetur.format.enable
set totrue
.What now has me confused is that I did try the formatter settings mentioned earlier, saw it was causing conflicts so I uninstalled the extensions and removed those settings, and it is still causing conflicts. So I ended up getting really confused as to what could be happening now even after changing the settings back to what I had.
I'm a little late to the convo but just came across this and it popped into my head... what is the value of
editor.defaultFormatter
in your VS Codesettings.json
by itself, assuming it is defined?Because according to the docs, whatever formatter is thus defined will override all other directives in the event of a conflict, assuming no language specific constraints.
I may be wrong, but I've always understood that to mean if defined, that configuration will have the last word no matter what.
Well this is a really good thing to be aware of - mine is set to
none
(and working).I'll also note that recently I had an issue where when copying my prettierrc and eslintrc.js files from one VS Code window to a new project's window required a restart (Code & Yarn) before it picked up with changes properly.
Well that's good at least you got it working. I've had similar issues in the past, especially with mono-repos and also trying to integrate Yarn v2/v3.