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.

Can't fold code in template region with pug

See original GitHub issue
  • 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 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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:14
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

45reactions
yoyo930021commented, Oct 9, 2020

Temporary Solution:

// vscode settings.json
{ "editor.foldingStrategy": "indentation" }
34reactions
Lsnshcommented, Jan 15, 2021

Or like this:

// vscode settings.json
{
    "[vue]": {
        "editor.foldingStrategy": "indentation"
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't fold code in template region with pug #2308 - Issuehunt
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 ...
Read more >
Is there any way to fold/collapse regional code in Eclipse?
Eclipse supports code folding. Go to workbench preferences -> General -> Editors -> Structured Text Editors, and check the "Enable folding" ...
Read more >
Template Inheritance - Pug
Add the variables to the Pug options object, or define them in unbuffered code in a parent template. The child template will inherit...
Read more >
Code Folding - Developer Help
(Note the '/' inside the ending </editor-fold> tag.) Instead of typing in the tags shown above, you can take advantage of code templates...
Read more >
Navbar - Bootstrap
collapse.navbar-collapse for grouping and hiding navbar contents by a parent breakpoint. Here's an example of all the sub-components included in a responsive ...
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