Search code examples
vue.jsvisual-studio-codepugcode-foldingvue-sfc

Support folding Pug blocks in Vue in VS Code


Is there a way to get VS Code to support folding blocks within Pug when used in Vue single-file components? That is:

<template lang="pug"
...
</template>

Solution

  • Based on this bug report the fact VS Code isn't doing this already seems to be do with using Vetur.

    Adding this to settings.json fixed it:

        "[vue]": {
            "editor.foldingStrategy": "indentation",
        }