vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Can we get back folding on help sections?

Open Jaykul opened this issue 5 years ago • 3 comments

Ever since the "syntax based" code folding was introduced image

The documentation sections won't fold the way they used to: image

Because the whole comment block is one big blob: image

Can we add support for the comment-based help documentation keywords to fold the help below them?

P.S. When I turn that setting off, it completely kills folding for PowerShell files until I kill the integrated terminal.

Jaykul avatar Oct 24 '20 04:10 Jaykul

Thanks @Jaykul this is because the "non-syntax" based folding is purely indentation-based but this is a valid request

SydneyhSmith avatar Oct 27 '20 20:10 SydneyhSmith

Oh yeah, I know it's just because I indent it to make it happen. 😉 I mean, I've been adjusting how I write code to take advantage of features in editors that don't really grok PowerShell since before we wrote a scintilla syntax for Notepad++ 😁 I'm sometimes ashamed of how many things I do just to keep the syntax highlighting working ... like putting quotes around strings even when they don't need it ...

Jaykul avatar Nov 01 '20 02:11 Jaykul

My team enforces long help blocks at the top - my preference is to fold those windy regions and just read the code. I would love a feature like powershell.editor.foldHelpBlocks.

fsackur avatar Aug 05 '22 14:08 fsackur