Skip to content

Fix formatting handlers and PSScriptAnalyzer loading #1764

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

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

andyleejordan
Copy link
Member

Now we return null per the LSP specification if the formatting request was canceled (such as will happen if the document is modified since the request was sent), and we only load our bundled PSScriptAnalzyer module. Similar to PSReadLine, we should not support loading an arbitrary version of the module, as that leads to difficult to fix bugs and complicates the code.

Should fix PowerShell/vscode-powershell#3928 and PowerShell/vscode-powershell#3926.

So that we don't return formatting for an old document.
Similar to PSReadLine, we need to use only our bundled version.
Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@andyleejordan andyleejordan merged commit f19f1b4 into master Apr 19, 2022
@andyleejordan andyleejordan deleted the andschwa/pssa-fix branch April 19, 2022 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Weird formatting issues
2 participants