-
Notifications
You must be signed in to change notification settings - Fork 271
support the workspace/configuration request #1090
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
Conversation
I think this makes sense. Could you fix the linting issues that were raised in the CI job? I'll try your PR out today and tomorrow and merge after the lint errors are fixed. 👍 |
4ea9347
to
226f021
Compare
I realized I was merging this PR into the wrong branch, which is why the lint errors were showing up. Fixed. |
This is breaking |
I'm not familiar with gopls, but it sounds like there might be some discrepancy between how it and rust-analyzer handle configuration: golang/go#38819 |
Yes, this is an instance of microsoft/language-server-protocol#972. |
Too bad that discrepancy exists there. I suppose we should wait until that is resolved then, as it could mean breaking the client with some servers. |
Could it be merged but only enabled with a config flag? It seems useful for some users now, and could be enabled only for file types with compatible servers. |
I guess we could add a config flag for this and have it disabled by default. If you are happy to add that I think we can make this work @euclio . Also, left a comment with a change I would make. |
I was browsing the code for rust-analyzer and it seems like it actually behaves the same as gopls. It expects the initialization options to be under a keyed object with the name of the language server. See https://github.com/rust-analyzer/rust-analyzer/blob/bf84e4958ee31c59e5b78f60059d69a73ef659bb/editors/code/src/client.ts#L40 So I think we're just not picking the correct settings there. We should modify our initialize request to fix this, as it makes I can open a PR to fix that, it will introduce a breaking change, but I suppose it's for a greater good. EDIT: This is a lot trickier than expected, because by the time we issue the initialiize request we don't know the name of the server, so we can't fetch the settings for it. Maybe we want to fetch the section |
bbf6e64
to
bf38d2c
Compare
bf38d2c
to
ab38619
Compare
Added a new comment. I'm not sure how this would work for you though, as I suppose it would suffer from the same issue that EDIT: Just saw you addressed my comment already. |
@euclio I'm planning to merge that PR I linked above (#1116). If you are happy to rebase this one to that one, and adjust this so that it uses |
6281c18
to
dbf9f42
Compare
Rebased. |
dbf9f42
to
550d89d
Compare
@euclio Sorry to bother again, just merged that branch to dev, but it seems like this needs rebasing again now. Happy to do it myself, but just sending the notice in case you prefer to do it yourself 😁 . |
Happy to do it, but I won't be able to get to it until tonight. |
Yeah no worries! Any time is fine 👍 |
550d89d
to
6998210
Compare
Rebased! |
Thank you! |
This is needed to send configuration to rust-analyzer and the TexLab language server.
Fixes #923.