-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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] How to override a specific lsp config #742
Comments
|
Thanks for the reply, I tried that, but now I am encountering a different issue: I put this in [[language]]
name = "rust"
language-server = { command = "rustup", args = ["run", "nightly", "rust-analyzer"] }
config = """
{
"cargo": {
"allFeatures": true,
},
"checkOnSave": {
"command": "clippy",
}
}
""" But |
Try turning on logging via |
I tried that, but the |
Seems like it doesn't work because the |
So is it a bug ? Or am I doing something wrong in the config ? Also, changing back to language-server = { command = "rust-analyzer" } is no good either |
That's because |
Sorry, I meant that I tried this language-server = { command = "rust-analyzer" } with Anyhow, I figured out the problem: the json parsing of the provided config was failing silently due to the trailing commas. Since we're already in a |
No, it has to be JSON according to the LSP spec. As for trailing commas, we should probably be logging such errors https://github.com/serde-rs/json/blob/8604ef948bec5190db6fa23d362bd3368620990c/src/error.rs#L66 Line 321 in 05c2a72
I'll get it done later today. |
yes, I meant read it as a let toml_value: toml::Value = toml::from_str(r#"
[config.cargo]
allFeatures = true
[config.checkOnSave]
command = "clippy"
"#).unwrap();
let json_value: serde_json::Value = toml_value.try_into().unwrap();
println!("{}", serde_json::to_string_pretty(&json_value).unwrap()) |
This goes outside of what I know (I haven't worked with the LSP code), but I suspect that it's because converting from JSON to Toml didn't really make sense. This was brought up before in the past before this was implemented, and I guess we decided to stick with JSON. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hi,
I just found out about this project, very promising stuff
I am trying to customize the lsp config: I install
rust-analyzer
with therustup
nightly toolchain meaning that the command to run it isrustup run nightly rust-analyzer
Is there a way to configure
helix
so it runs that command forrust-analyzer
?The text was updated successfully, but these errors were encountered: