You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've implemented syntax/AST-based folding in the PowerShell extension, but the folding ranges it designates must be labelled with a FoldingRangeKind.
Region was chosen for syntax folds, since (for example) an if-block is not a Comment or an Import. But this means using "(Un)fold All Regions" toggles syntax-based folding as well, when a user might only want to fold explicit #regions.
Our current prospective solution is to assign a FoldingRangeKind of -1 or similar (which seems to work). But naturally that's not an ideal solution.
Is there currently a supported way of distinguishing #region folding ranges from custom syntactic folding ranges?'
(Also, I imagine that adding new enum values into FoldingRangeKind to cater to increasingly granular folding ranges would be infeasible -- just more an illustration of our current workaround.)
The text was updated successfully, but these errors were encountered:
From PowerShell/vscode-powershell#1458 (comment).
We've implemented syntax/AST-based folding in the PowerShell extension, but the folding ranges it designates must be labelled with a
FoldingRangeKind
.Region
was chosen for syntax folds, since (for example) anif
-block is not aComment
or anImport
. But this means using "(Un)fold All Regions" toggles syntax-based folding as well, when a user might only want to fold explicit#region
s.Our current prospective solution is to assign a
FoldingRangeKind
of-1
or similar (which seems to work). But naturally that's not an ideal solution.Is there currently a supported way of distinguishing
#region
folding ranges from custom syntactic folding ranges?'(Also, I imagine that adding new enum values into
FoldingRangeKind
to cater to increasingly granular folding ranges would be infeasible -- just more an illustration of our current workaround.)The text was updated successfully, but these errors were encountered: