-
Notifications
You must be signed in to change notification settings - Fork 510
PowerShell code folding is not working for here strings #177
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
Comments
This is a VSCode issue at this point in time. It supplies the folding based purely on indentation level. It does not allow the extension/language to participate in determining what folds. See microsoft/vscode#3422 |
Yep, unfortunately we can't help with that at the moment. I'm hoping that the code folding feature is going to be improved in the near future. |
I'm going to re-open this issue as a way to track the common request that code folding be improved. This is an issue that still needs to be fixed by the VS Code team. |
Information: #region does work inside functions which the first 4 spaces. But not outside a function, or after 5 spaces and more. See more in closed issue #129 |
Yup, same issue. VSCode folds based on indentation level. The language extension does not get a chance to participate in code folding to provide more semantics-aware folding. Too bad. I hope VSCode can add this before too long. |
I would love to be able to fold at #region as well. |
Does a new GitHub issue need to be created for edit: Nevermind? If I read this correctly, the issue is a limitation with VS Code's code folding feature? |
@sgtoj yep, |
howdy y'all, is there a VSCode issue for this? if so, would some kind person please point me to it? take care, |
howdy rkeithhill, thank you! [grin] my search talent was not up to snuff ... take care, |
VSCode team added region folding support! Please open a new issue if you see any problems. |
While region support has been added, here strings in PowerShell are still a problem. |
Good point - I missed that part of the issue. I'll reopen this and rename it to specify here strings |
Hi, just want to drop an idea here about the powershell here strings. Would it be better to add an There they are already a pain in the ass, when you are refactoring a block of code. iE put an Don't have any idea about the syntax, but this example shows the concept: if ($true){
write-Host head
write-host @@"
Line 1
Line 2
"@@
}
# output
# head
# Line 1
# Line 2 |
So, according to this, the VSCode Team has implemented an API for code folding. I'm sure this is on the implementation radar somewhere, @rkeithhill ? |
@mpearon Thanks for the pointer. We'll definitely be looking at this but keep in mind that it is a "proposed" API with limitations i.e.:
So we will be tracking development of this API but we will need to wait until it's done before rolling it out with the PowerShell extension. |
@rkeithhill - I completely understand! :) I'm just glad you guys are aware of it. I'm excited to see the magic happen! |
Looks like it's official! https://code.visualstudio.com/updates/v1_23#_folding-provider-api |
Since there is an official provider now, has this become an active pursuit, @rkeithhill? |
@mpearson It can be pursued with enough 👍's! Don't expect it right away because everyone has been tied down with other things: I'm fighting performance issues with intellisense, Rob's but dealing with some PowerShell/PowerShell tasks. Keith may be able to pick this up. He'll have to chime in on that. This is an open source project so feel free to take a crack at it, otherwise, we'll get to it as soon as we can. 😀 There's lots to do! |
@tylerl0706 I completely understand! I really wish I was to the point where I could legitimately contribute, because this is such a cool project. I'll working on getting there, but I'm still very fresh. |
Going to dupe this to #1276 😄 |
still no code folding if using here strings :(
or #region for that matter.
The text was updated successfully, but these errors were encountered: