vue-html not working for SFC
See original GitHub issue- I have searched through existing issues
- I have read through docs
- I have read FAQ
- I have tried restarting VS Code or running
Vetur: Restart VLS
Info
- Platform: Linux
- Vetur version: 0.29.0
- VS Code version: 1.50.1
Problem
I have a vue-typescript project. I only want to disable the formatting (formatter: prettier) for <template>...</template>
in the .vue SFC files and format the typescript and SCSS.
Content of settings.json in my working directory
{
"editor.quickSuggestions": {
"strings": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.detectIndentation": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"vetur.format.enable": false,
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"[vue-html]": {
"editor.formatOnSave": false
}
}
Content of .prettierrc
{
"endOfLine": "lf",
"semi": true,
"useTabs": false,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true
}
Reproducible Case
- Create a Vue Project
vue create test-project
- Install Prettier
yarn add -D prettier
- Paste the contents of settings.json (from above) in
**/.vscode/settings.json
- Paste the content of prettier configuration (from above) in
**/.prettierrc
- Reload editor ⇒ Open any *.vue file (say App.vue) ⇒ Press CTRL+S
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
Single-File Components - Vue.js
Author modularized components using familiar HTML, CSS and JavaScript syntax; Colocation of inherently coupled concerns; Pre-compiled templates without runtime ...
Read more >Vue sfc spec is not compatible with html5 or xhtml or any xml ...
You need to parse Vue template tag? Before it is compiled and mounted by Vue framework? Or after it is compiled? ... yes,...
Read more >Creating our first Vue component - Learn web development
Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to...
Read more >Vue - Parcel
Note: Parcel does not support using SFCs with Vue 2, you must use Vue 3 or ... Parcel uses the official Vue SFC...
Read more >Vue.js | IntelliJ IDEA Documentation - JetBrains
Make sure the JavaScript and TypeScript and Vue.js required plugins are enabled on the Settings/Preferences | Plugins page, tab Installed, see ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can set VSCode setting.
Ha, we can’t solve original problem. It is a limit in VSCode. 😂