-
Notifications
You must be signed in to change notification settings - Fork 418
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
Adds support for /completion and /completion/resolve endpoints for Cake. #1944
Adds support for /completion and /completion/resolve endpoints for Cake. #1944
Conversation
bjorkstromm
commented
Sep 15, 2020
- Fixes Missing Cake Response handlers in V1.37.1 #1939
// [Fact] | ||
// public async Task ShouldGetCompletionWithAdditionalTextEdits() | ||
// { | ||
// const string input = @"Regex.Repl$$"; |
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.
Anyone know how to get a completion with Additional Text? In Cake, e.g. we don't have System.Text.RegularExpressions
namespace imported by default. This was my attempt to get a completion from CompletionItemExtensions.TypeImportCompletionProvider
. I also tried var regex == new Rege$$
, but that didn't work.
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.
it's disabled by default, you need to pass in an option RoslynExtensionsOptions:EnableImportCompletion
https://github.com/OmniSharp/omnisharp-roslyn/blob/master/tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs#L1399
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.
Ah, thank you!
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.
Auch! Does AdditionalTextEdits always contain the whole buffer? //cc @333fred
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.
Unfortunately, yes.
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.
Unfortunately, yes.
Thanks for the quick reply. In that case I think I'll just remove all additional texts for Cake files. Can Completion return Additional text, or is it just the Resolver that adds this?
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.
Override completion can do this as well, and those are not usually so long.
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! I managed to get override completion in at least. Or if it doesn't bring in an unimported type.