vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

Can't fold code in template region with pug #2308

Open cekerholic opened 4 years ago

cekerholic commented 4 years ago

Info

Problem

Can't collapse code in template region with lang="pug" (similar to https://github.com/vuejs/vetur/issues/2234)

Reproducible Case

Create vue template like this:

<template lang="pug">
  .parent
    .children
      .grand-children
        p sometext
      .grand-children
        p sometext
</template>

Without vetur it will collapse as expected, but not with vetur enabled.

octref commented 4 years ago

If you want this you'll lose JS #region folding.

csj8520 commented 4 years ago

stylus also has this problem

yoyo930021 commented 4 years ago

stylus also has this problem

I think you need to open another issue.

yoyo930021 commented 4 years ago

Temporary Solution:

// vscode settings.json
{ "editor.foldingStrategy": "indentation" }
Lsnsh commented 3 years ago

Or like this:

// vscode settings.json
{
    "[vue]": {
        "editor.foldingStrategy": "indentation"
    }
}