-
-
Notifications
You must be signed in to change notification settings - Fork 120
fix(lsp): copy settings to init_options when starting the server to match VSCode #490
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
Review ChecklistDoes this PR follow the Contribution Guidelines? Following is a partial checklist: Proper conventional commit scoping:
If applicable:
|
d434cae to
74ff58f
Compare
74ff58f to
88510d2
Compare
mrcjkb
left a comment
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 🙏
LGTM.
The rust-analyzer.toml support in R-A itself is still incapable of reading the file at startup... :/)
I will probably deprecate rustaceanvim's rust-analyzer.json feature in favour for rust-analyzer's rust-analyzer.toml feature soon.
|
At this rate, not only will it be a long time before the TOML support is functional, there is apparently a list of configs you cannot ever use TOML to configure, which are reserved for the LSP client to send as JSON as it's assumed they would never be configured beyond a single person's editor. And these lists are very much in flux. So please don't deprecate the feature! It's the only thing that works. |
|
rustaceanvim now also supports |
This is a prerequisite to using
workspace_discoverConfigat all, since if it isn't present in the initialization RPC, then rust-analyzer just discovers a cargo project and never looks at workspace_discoverConfig ever again. The discoverConfig stuff is pretty unstable but this at least gets things going.Note that VSCode does it this way as well. I think at this point we may be sending too many didChangeConfiguration RPCs, but at least stuff works!
Example config -- using
rust-projectfrom the buck2 project(Put this in a
rust-analyzer.jsonfile for rustaceanvim to find. Therust-analyzer.tomlsupport in R-A itself is still incapable of reading the file at startup... :/){ "rust-analyzer.workspace.discoverConfig": { "command": [ "rust-project", "develop-json", "--use-clippy", "false", "{arg}" ], "progressLabel": "buck2/rust-project", "filesToWatch": ["BUCK", "BUCK.v2"] } }