Add support for an lsp language client to specify which capabilities they support.#48685
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
45a8bfd to
d050ac7
Compare
dibarbet
left a comment
There was a problem hiding this comment.
other than the xaml initialize, everything else looks good
There was a problem hiding this comment.
the xaml provider needs to specify a different set of capbilities - see their handler here
http://sourceroslyn.io/#Microsoft.VisualStudio.LanguageServices.Xaml/Implementation/LanguageServer/Handler/Initialize/InitializeHandler.cs,9663db7ec51dd43e
d050ac7 to
9cf011c
Compare
dibarbet
left a comment
There was a problem hiding this comment.
lgtm, just need to update the tests (maybe we don't even need that test)
9cf011c to
9d24b8e
Compare
|
Hello @CyrusNajmabadi! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
src/VisualStudio/Core/Def/Implementation/LanguageClient/AbstractInProcLanguageClient.cs
Outdated
Show resolved
Hide resolved
|
I can try that! |
| public async Task<InitializeResult> InitializeAsync(InitializeParams initializeParams, CancellationToken cancellationToken) | ||
| public Task<InitializeResult> InitializeAsync(InitializeParams initializeParams, CancellationToken cancellationToken) | ||
| { | ||
| Contract.ThrowIfTrue(_clientCapabilities != null, $"{nameof(InitializeAsync)} called multiple times"); |
There was a problem hiding this comment.
Fun fact: Our code does not live up to this contract check :D
There was a problem hiding this comment.
wait... how?
There was a problem hiding this comment.
We initialize _clientCapabilities in the constructor 🤦♂️
I'm fixing it :)
No description provided.