elixir: Respect LSP settings for elixir-ls
(#11302)
This PR updates the Elixir extension to respect the LSP settings for `elixir-ls`: ```json "lsp": { "elixir-ls": { "settings": { "dialyzerEnabled": false } } } ``` ``` Received workspace/didChangeConfiguration Received client configuration via workspace/didChangeConfiguration %{"dialyzerEnabled" => false} Loaded DETS databases in 33ms Loaded DETS databases in 10ms Compiling 65 files (.ex) ``` Release Notes: - N/A
This commit is contained in:
parent
98ea5e172e
commit
8b284331a3
2 changed files with 33 additions and 1 deletions
|
@ -102,6 +102,23 @@ impl zed::Extension for ElixirExtension {
|
|||
_ => Ok(None),
|
||||
}
|
||||
}
|
||||
|
||||
fn language_server_workspace_configuration(
|
||||
&mut self,
|
||||
language_server_id: &LanguageServerId,
|
||||
worktree: &zed::Worktree,
|
||||
) -> Result<Option<serde_json::Value>> {
|
||||
match language_server_id.as_ref() {
|
||||
ElixirLs::LANGUAGE_SERVER_ID => {
|
||||
if let Some(elixir_ls) = self.elixir_ls.as_mut() {
|
||||
return elixir_ls.language_server_workspace_configuration(worktree);
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
zed::register_extension!(ElixirExtension);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue