-
Notifications
You must be signed in to change notification settings - Fork 199
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
Fix bad completion commit in vs code #11398
Conversation
… Razor completion items
…AttributeTransitionCompletionItemProvider
...icrosoft.AspNetCore.Razor.LanguageServer/Hosting/ConfigurableLanguageServerFeatureOptions.cs
Outdated
Show resolved
Hide resolved
...t/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Completion/RazorCompletionListProviderTest.cs
Show resolved
Hide resolved
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.
We need to avoid specifying explicit commit characters in VS Code as there is no soft selection and typing when completion list is up is much more likely to commit wrong items.
Is there a more in-depth explanation of what is going wrong? Per-CompletionItem commit characters are part of the LSP spec and VS Code supports them, so I'd like to understand why VS Code is broken by them. Also, did this work in the past and was only recently broken in VS Code? If so, do we know why?
This became an issue after my work to switch VSCode from legacy completion endpoint to the VS completion endpoint. Dan filed the bug a few months ago and I apparently missed it until you mentioned it recently in a meeting. VS Code does support per-item commit characters, that part is not a problem. The specific commit character causing an issue here is forward slash. If you type |
Thanks! That explanation is very helpful! |
...icrosoft.AspNetCore.Razor.LanguageServer/Hosting/ConfigurableLanguageServerFeatureOptions.cs
Outdated
Show resolved
Hide resolved
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.
Looks good! One suggestion about naming but it's minor
Summary of the changes
We need to avoid specifying explicit commit characters in VS Code as there is no soft selection and typing when completion list is up is much more likely to commit wrong items. This is especially true when commit characters are specified explicitly in some Razor completion items to work around some of the VS completion quirks. We can do so by defining a new flag and passing it from VS Code to rzls to specify the desired commit character set.
There will be a corresponding PR in VS Code to actually pass the new flag.
Fixes:
#10601