Extension 'Vetur' cannot format 'test.vue'
See original GitHub issueInfo
- Platform: macOS
- Vetur version: 0.24.0
- VS Code version: 1.47.0-insider
Problem
After setting Vetur as the default formatter for Vue files I get a generic error when trying to format a vue component: Extension ‘Vetur’ cannot format ‘test.vue’
Reproducible Case
Install Vetur and set it as the default formatter. Create a new Vue component:
<template lang="pug">
div
div.my-class Test
</template>
Then right click and click ‘Format Document’.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:9 (3 by maintainers)
Top Results From Across the Web
vue.js - VS Code can't format code in <script> tags in .vue files ...
I've just started using the Vetur VS Code extension for formatting .vue files. Everything seemed to work fine (syntax highlight, EMMET, etc.) ...
Read more >How I Resolved Vue.js, VSCode, Vetur, Prettyhtml, and ...
So, when open a . vue file in VS Code and Format Document with Vetur, it uses Prettyhtml by default, which violates prettier...
Read more >Formatting | Vetur - GitHub Pages
Vetur only has a "whole document formatter" and cannot format arbitrary ranges. As a result, only the Format Document command is available. The...
Read more >User Guide | eslint-plugin-vue
If you want to run eslint from the command line, make sure you include the .vue extension using the --ext option or a...
Read more >VS Code tips — The Vetur extension for working with Vue.js
Your browser can't play this video. ... Today's VS Code extension : Vetur Vetur adds all the editor tools for writing Vuejs in...
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
What worked for me was changing:
"vetur.format.enable": false
to"vetur.format.enable": true
I think quasar might disable this by default when creating through the cli
In any project quasar have a some problem