-
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
Question about IDidChangeConfigurationHandler #124
Comments
FWIW, I wound up working around that problem by defining my own custom handler that does use ...and implementation: ...and the ...and how the |
@tintoy thanks for getting back to me!! That looks like exactly what I want/need, if there are no objections, I will unashamedly borrow that 😄 Do you know if there is a reason that the OOTB implementation doesn't provide something like this? |
You’re welcome to - it’s MIT licensed :) I suspect the answer is historical reasons. Not sure exactly what they are though. |
I did check that before, and I am very grateful that this is how it is licensed. Correct/grateful attribution will be added to the project though. |
@tintoy do you know if something has changed in this area... Your project is using 0.7.9 of OmniSharp and mine is using 0.11.3. |
Yeah probably - I had to make significant extensions to the LSP library for my extension (required functionality wasn’t present at the time) so I haven’t had time to upgrade yet (newer versions are so different from older ones that it’s pradtically a rewrite in some areas). Basic principle still applies I believe, but interface names might be slightly different :) |
Take a look at the interface definition for the configuration handler in the LSP library - maybe use that as the basis for your new handler? |
@tintoy I have "something" compiling 😄 just away to test it just now. Seems like |
I think this is what you're looking for... |
Just define your own parameters model and use that instead. |
Going to have to play with this later, as I have other things that I need to be getting on with 😄 Thanks for your help so far though. I have something that compiles, and doesn't seem to generate any runtime errors, but changing the configuration settings isn't causing anything to be triggered. Will play again later. |
@tintoy scratch that... I have it working! Or at least, I think I do 😄 I will attempt to finalize a PR for my repo, and if you have some time, I might ask that you and @mholo65 have a look at it to make sure I am not doing anything stupid 🐱 |
@tintoy I have a WIP PR here, where I have the basics in place: https://github.com/gep13/chocolatey-vscode/pull/135 Would you have some time for a review at some point? Thanks! |
definitely still a bug to be fixed... I'm going to try and fix this tonight or this weekend. |
I am trying to implement the IDidChangeConfigurationHandler interface, for use within a Language Server that we are creating here:
https://github.com/gep13/chocolatey-vscode
For validating the Chocolatey Nuspec file when editing within VSCode. In general, things have been going very well with this implementation thanks to some input from @mholo65. The problem stems from the fact that ideally, I would like to have configuration in the following format:
However, when I try to run the Language Server with this configuration, I get the following error:
Digging into the tests, it looks like it is expected that the JSON values are only boolean, number and string, rather than the more complex JSON types:
csharp-language-server-protocol/test/Lsp.Tests/Models/DidChangeConfigurationParamsTests.cs
Lines 18 to 23 in 0832add
However, the specification for the Language Server Protocol suggests that it should be of type
any
:https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeConfiguration
Is there a reason for not implementing the settings object directly as a JObject, or something similar?
I could work around this using a configuration similar to the following:
However, I was hoping to expand to having a configuration similar to the following extension:
https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
/cc @tintoy @david-driscoll
The text was updated successfully, but these errors were encountered: