Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
cekerholic opened this issue Sep 22, 2020 · 5 comments
Open
3 tasks done

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

cekerholic opened this issue Sep 22, 2020 · 5 comments

Comments

@cekerholic
Copy link

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: macOS
  • Vetur version: v0.27.3
  • VS Code version: 1.59.1

Problem

Can't collapse code in template region with lang="pug" (similar to #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
Copy link
Member

octref commented Sep 23, 2020

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

@csj8520
Copy link

csj8520 commented Sep 24, 2020

stylus also has this problem

@yoyo930021
Copy link
Member

stylus also has this problem

I think you need to open another issue.

@yoyo930021
Copy link
Member

yoyo930021 commented Oct 9, 2020

Temporary Solution:

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

@Lsnsh
Copy link

Lsnsh commented Jan 15, 2021

Or like this:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants