-
Notifications
You must be signed in to change notification settings - Fork 420
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
Property completion #1957
Property completion #1957
Conversation
Because I misread the LSP spec when imlementing completion, I didn't realize that InsertTextFormat applied to both InsertText, and to the NewText property of the main TextEdit of a completion item. This latter version is much more robust to casing issues than using InsertText directly, and ensures that matching of completion items in the completion list works better as well. Fixes dotnet/vscode-csharp#4063.
…ment with examples on vscode behavior for replacing ranges.
Use text edit for main insert text
* upstream/master: Make the regex tests windows only. Correct regex completion
* Remove incorrect assert * Update the tests for the TextEdit changes * Mark InsertText as obsolete to prevent new uses.
* upstream/master: Docs: Remove redundant statement about logging Docs: Remove duplicated file, link to it instead Docs: File moved from wiki to doc folder Docs: Specify relationship to .NET Core SDK moved to .net 5.0 SDK 5.0.100-rc.1.20452.10 added WarningsNotAsErrors for obsoletion to OmniSharp.Roslyn.CSharp.Tests/OmniSharp.Roslyn.CSharp.Tests.csproj mark autocomplete endpoint as obsolete restored regex test as conditional
The new part of this change is in commit 9. Commits 1-7 are based on #1941, and commit 8 is merging in master. |
Alright, I really hope that nothing I did broke azdo package upload, because if it is something I did then everything is a lie. |
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.
thanks a lot! I feel a bit embarrassed that I didn't notice the property overrides thing..
src/OmniSharp.Abstractions/Models/v1/Completion/CompletionItem.cs
Outdated
Show resolved
Hide resolved
src/OmniSharp.Abstractions/Models/v1/Completion/CompletionItem.cs
Outdated
Show resolved
Hide resolved
Same... |
@333fred looks like this fails on linux
not sure if this is transient or not, let's see if the retry helps. Looks like Cake has some special host object property that is overrideable? @mholo65 not sure why it would affect Linux only though |
hmm it passed now, but looking at the error above it looks like there is some race condition or other indeterministic state in the Cake tests. we can merge for now but we should keep an eye on this |
@filipw thanks! I will dig into the Cake error and see if I find something obvious. |
Based on #1941. In the process of playing around with the code, I discovered that I totally forgot about overriding properties when I implemented completion... 🤦♂️. This implements a more robust algorithm for finding the correct location in the changed text, and also handles property overrides correctly.