E
E
EvgeniySaschenko2021-03-21 01:00:20
Vue.js
EvgeniySaschenko, 2021-03-21 01:00:20

How to enable code formatting for js, sass, pug files in Vetur?

Good afternoon,

I want to build Vue using sass and pug syntax, I use Vetur to format the code. In single-file components, the code is formatted, but if I put the code in separate sass, pug, js files, the formatting does not work.

How can I enable code formatting for js , sass , pug files?

I use VS Code as an editor, the config is as follows:

{
  "editor": {
    "defaultFormatter": "octref.vetur",
    "formatOnSave": true,
    "tabSize": 2,
    "insertSpaces": true,
  },
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question