-
Notifications
You must be signed in to change notification settings - Fork 511
Folding: Allow option to leave closing brace line visible #1514
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
Labels
Comments
3 tasks
glennsarti
added a commit
to glennsarti/vscode-powershell
that referenced
this issue
Sep 28, 2018
…ult VSCode Changes the default to true Adds tests
glennsarti
pushed a commit
to glennsarti/vscode-powershell
that referenced
this issue
Oct 2, 2018
glennsarti
added a commit
to glennsarti/vscode-powershell
that referenced
this issue
Oct 2, 2018
…ult VSCode Previously the code folding provider would hide the last line of the region, however the default VS Code code folding behaviour is to instead hide from the beginning to end minus one, lines. This commit; * Adds a configuration parameter to show/hide the last line in a region, defaulting to Show the last line * Modifies conversion method for the internal region class to FoldingRange object to show/hide the last line based on the extension settings * Modifies the tests for the default value and adds tests for the show and hide scenarios This code is based on a solution created by; ens-rpitcher <[email protected]>
4 tasks
glennsarti
added a commit
to glennsarti/vscode-powershell
that referenced
this issue
Oct 9, 2018
…ult VSCode Previously the code folding provider would hide the last line of the region, however the default VS Code code folding behaviour is to instead hide from the beginning to end minus one, lines. This commit; * Adds a configuration parameter to show/hide the last line in a region, defaulting to Show the last line * Modifies conversion method for the internal region class to FoldingRange object to show/hide the last line based on the extension settings * Modifies the tests for the default value and adds tests for the show and hide scenarios This code is based on a solution created by; ens-rpitcher <[email protected]>
TylerLeonhardt
pushed a commit
that referenced
this issue
Oct 23, 2018
…#1557) Previously the code folding provider would hide the last line of the region, however the default VS Code code folding behaviour is to instead hide from the beginning to end minus one, lines. This commit; * Adds a configuration parameter to show/hide the last line in a region, defaulting to Show the last line * Modifies conversion method for the internal region class to FoldingRange object to show/hide the last line based on the extension settings * Modifies the tests for the default value and adds tests for the show and hide scenarios This code is based on a solution created by; ens-rpitcher <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary of the new feature
As a user I want an option for brace-delimited code folding regions to leave the closing brace visible when the region is folded.
The current folding behaviour of VSCode with the PowerShell folding provider disabled leaves the opening and closing lines visible and folds the code in the contained lines.

With the PowerShell syntax-aware folding enabled the last line is also collapsed into the fold.

This means that any subsequent code blocks in the same construct are hidden and this obscures the code structure too much.
Would it be possible to either change the folding to match the default behaviour of VSCode indent-based folding or, preferably, add an option to allow a choice of behaviour?
The text was updated successfully, but these errors were encountered: