question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extension Vetur cannot format MyComponent.Vue

See original GitHub issue

Heya! I’m not sure why but Vetur doesn’t run on some of my projects. I have made one of them easily clonable so you can try reproduce it. Vetur won’t run at all for me but not sure why. : ) I think I did the setup correctly though!!

  • 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: macOS Catalina
  • Vetur version: v0.29.1
  • VS Code version: Version: 1.51.0

Problem

image image

Reproducible Case

git clone https://github.com/fergusmeiklejohn/cycraft
git checkout vetur-issue
yarn
code .

Then navigate to any vue file and press ⌘S

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
sebastianjungcommented, Jan 11, 2021

for anyone else having this problem. I had to remove something like this from my settings.json for it to format again:

...,
 "[vue]": {
        "editor.tabSize": 2,
        "editor.defaultFormatter": "..."
 },
 ...
5reactions
rchlcommented, Nov 10, 2020

You have "vetur.format.enable": false, in your local .vscode/settings.json.

Read more comments on GitHub >

github_iconTop 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 >
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 >
"Extension 'Vetur' cannot format" when Template interpolation ...
Workaround · Go to Vetur settings · Toggle the "Template interpolation service" off and on again · Formatting works as expected until next...
Read more >
cannot find module 'vue-class-component' - You.com
I have a fresh project which I created using the vue command line tool. vue create . But when I type npm serve,...
Read more >
'defineComponent' in Vue 3 Is Pure Magic! - Telerik
An object format with object props; A custom option definition. That would be a horrible experience, wouldn't it!? And that is exactly why ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found