-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat(lsp): add command to reload lsp settings #309
Conversation
Review ChecklistDoes this PR follow the Contribution Guidelines? Following is a partial checklist: Proper conventional commit scoping:
If applicable:
|
4cb8f1c
to
4aa0464
Compare
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 for the PR 😄
This seems like a good approach.
I'll see it I can find some time to test it soon.
4aa0464
to
618e8a2
Compare
618e8a2
to
5d9b8d9
Compare
@mrcjkb I'm having troubles with the lua type checker, the CI build fails, and I can reproduce locally by running
For some reason, it has trouble detecting that |
Don't worry about that. I'll fix it before merging 😀 |
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.
Tested it, and it seems to be working well 😄
Following the discussion we had in #286, I found out how to reload settings using
workspace/didChangeConfiguration
.Turns out the lsp server responds by a
workspace/configuration
where the server actually pulls the new configuration, since the server can cache configuration and decides whether it needs to actually pull the config.nvim
handles it, but we need to set theclient.settings
table to the new configuration before sending theworkspace/didChangeConfiguration
because it seems to be the one used by nvim to send the actual config.I added this feature as a command because it made sense to me, let me know if it does not for you.
Once again, tested the changes on https://github.com/GuillaumeLagrange/neoconf-repro and it works for me.
Cheers