language-tools
language-tools copied to clipboard
How to use format
How to use formatting for Vue files?
I have enabled the settings in my configuration file, but the formatting is invalid
nothing changed!
Same issue here. Setting Vue-Official as the formatter does not work.
For anyone who is seeing this issue, here's the solution for me.
- In a vue file, click the Vue button in the bottom right corner of VSCode, and select "Configure 'vue' languange based settings..." from the pop-up window. [^1]
- Add
"editor.defaultFormatter": "Vue.volar"
in[vue]
.
{
// add formatter setting for vue files
"[vue]": {
"editor.defaultFormatter": "Vue.volar"
}
}
[^1]: Or directly open your settings.json somewhere to add the setting.