-
Notifications
You must be signed in to change notification settings - Fork 104
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
Wrong IRegistration definition #136
Comments
(GH-136) Corrected IRegistration definition
@david-driscoll so while this issue has now been resolved, I have just tried the latest MyGet bits on my Extension, and it is still showing the same error message, so I suspect that there is still a problem. The extension in question is here: https://github.com/gep13/chocolatey-vs If you open the sln in VS 2019, and debug it, when the experimental instance opens, if you open the ConsoleApp1 sln, and then open the nuspec file (it doesn't actually have anything in it) it should activate the extension, and start the LSP Client, which will then throw an exception in the Would it be possible to re-open this issue, or should I open a new one? |
@mholo65 Am I right in thinking that even with this change, I won't fix the issue that we are currently seeing, i.e. Chocolatey.Language.Server works in VSCode but not VS. Or have I misunderstood. Should we also raise an issue "somewhere" about the VS implementation? |
@gep13 once we get static registration working as expected on the server side, it should work. I’ll see if I can find some spare time today or tomorrow. |
I'd like to take a look at this, because it's currently blocking me using OmniSharp.Extensions.LanguageServer in Visual Studio. Does one of you mind pointing me in the right direction for where the fix mentioned above should be done? |
Is it as straightforward as changing the CodeActionProvider = ccp.HasStaticHandler(textDocumentCapabilities.CodeAction) ? (BooleanOr<CodeActionOptions>) ccp.GetStaticOptions(textDocumentCapabilities.CodeAction).Get<ICodeActionOptions, CodeActionOptions>(CodeActionOptions.Of) : false, |
I've created a pull request #139 with a possible fix. |
Fixed in #140 |
Following on from the fix that was provided here:
#132
When trying to run the Chocolatey Language Server again in Visual Studio, I was met with another error:
Error converting value {null} to type 'System.Boolean'. Path 'capabilities.codeActionProvider'.
Full stack trace here:
After discussing this with @mholo65 he thinks he has figured out what the problem is.
He believes that here:
https://github.com/OmniSharp/csharp-language-server-protocol/blob/master/src/Protocol/Document/Server/ICodeActionHandler.cs
Is using the wrong
IRegistration<TextDocumentRegistrationOptions>
and instead, it should be using this:https://github.com/OmniSharp/csharp-language-server-protocol/blob/4050dad05963ac5d7df3579345bde9edd25971fb/src/Protocol/Models/CodeActionRegistrationOptions.cs
I tend to agree with him. I am going to create a PR to correct this in a short while.
The text was updated successfully, but these errors were encountered: