-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
Make #region
work on <script>
section
#899
Comments
I'm really missing this feature, i tried playing around with the following values:
vetur/languages/vue-language-configuration.json Lines 33 to 38 in 2cf32f2
And it actually works by providing the following config: "folding": {
"markers": {
"start": "(^<(template|style|script)[^>]*>\\b|^\\s*//\\s*#?region\\b)",
"end": "(^<\/(template|style|script)>\\b|^\\s*//\\s*#?endregion\\b)"
}
} But there are several issues, the folding is only available afer reloading the window, also the indention seams to be off in some of my components which does not allow me to have the content of the region to be on the same or lower level then the region. Changing the |
@Hammster VS Code now has 3 types of folding
|
@octref the region folding is the only way a user can explicitly state folding blocks. I'm not sure if that's what you mean by "folding markers" but if so what is unreliable about them? |
In VScode following is not working in .vue files but works in .js files. |
This is a great feature addition. Already being worked on? Can we help or test? |
Much needed. Any news on that? |
Just realized that regions are not available in .vue files. Any news/movement on this? Would be SUPER helpful. |
Hey that's an important feature. Is it being implemented? |
+1 |
1 similar comment
+1 |
+1 THis is actually super important especially in large components. |
+1 would love to see this |
+1 This is definitely needed. Any update? |
+1 This is useful |
I know I am just another request, but it will come in handy for some code bases. |
The issue is open so there's no update yet. I'll try to make time to implement it. |
Hi all, sorry, a beginner question here: Is this normal that the following does not allow me to collapse the lines 39-43? What should I do instead? Thank you. (VS Code with Vetur extension enabled) |
Is this code in script part? |
@capar it seems it only works when it has a name, so... // #region some name
someCode();
// #endregion [EDIT] hmm, I tried it again and it works without the name too, so maybe it's something else not working on yours... |
Same here, .vue files doesn't work. And I was so excited. :D |
Came across this issue and realised I had |
Doesn't fix it for me. I already have folding strategy at auto. |
From microsoft/vscode#39939. There is no folding regions being returned back from
//#region
, as VS Code does for TypeScript.This is the
foldingRange
support for LSP: https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange.The text was updated successfully, but these errors were encountered: