-
Notifications
You must be signed in to change notification settings - Fork 501
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
{DO NOT MERGE} (GH-1609) Remove syntax folder provider feature #1610
Conversation
Now that the PowerShell Editor Services has a Folding Provider, this extension based feature is no longer required. This commit removes the feature and tests. The PSES Issue PowerShell#793 [1] tracks the work to add it to PSES. [1] PowerShell/PowerShellEditorServices#793
Just to make sure, VSCode itself implements the client-side folding right? So we don't need to add any new handling for the server-side provider ourselves? |
We should link to the relevant VSCode feature documentation in the issue |
I haven't seen the source code but this what I've observed;
|
Oh right, so the registration is in the |
AFAIK There is no explicit documentation on this |
Yes. The logic in PSES is;
|
Bugger. I'll keep searching just so we have a few signposts on how it all works. |
The deep internal reference documentation of VSCode isn't the greatest :-( This is probably no different that a Document Symbol provider or Hover provider or Completion provider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is really as simple as it sounds and we just need to remove the feature client-side this looks good to me!
Works on my machine. Would appreciate someone on Mac and/or Ubuntu to try it out. |
Checked out your code in both repos. Can confirm, works on macOS 😄 Folding a here string worked perfectly and settings updates were automatically applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
The new syntax folding doesn't work correctly. Prior to this PR, "Fold All" did what I expect: function definitions collapsed into a single line, etc. Now, folding is randomly collapsing more than a single function/stanza, or not an entire function/stanza. Syntax folding is essentially completely broken for our PowerShell module authoring as of this PR. I can't easily provide examples witout violating company NDA, but if I am not the only one with this issue I can generate representative code that displays the problem. |
Hi @cpdohert, thanks for the feedback. The issue tracking this is #1631. The fix is being worked on in PowerShell/PowerShellEditorServices#805. |
THIS PR SHOULD NOT BE MERGED UNTIL PowerShell/PowerShellEditorServices#777 is merged
PR Summary
Now that the PowerShell Editor Services has a Folding Provider, this extension
based feature is no longer required. This commit removes the feature and tests.
The PSES Issue #793 [1] tracks the work to add it to PSES.
[1] PowerShell/PowerShellEditorServices#793
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
x
between the square brackets.Please mark anything not applicable to this PR
NA
.WIP:
to the beginning of the title and remove the prefix when the PR is readyFixes #1609