mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 12:38:02 +00:00
Ruff: pass initialization_options from settings (#14866)
No version bump, as the extension is not out yet. Release Notes: - N/A
This commit is contained in:
parent
1218a846c1
commit
71cbfc65b1
1 changed files with 12 additions and 0 deletions
|
@ -106,6 +106,18 @@ impl zed::Extension for RuffExtension {
|
|||
})
|
||||
}
|
||||
|
||||
fn language_server_initialization_options(
|
||||
&mut self,
|
||||
server_id: &LanguageServerId,
|
||||
worktree: &zed_extension_api::Worktree,
|
||||
) -> Result<Option<zed_extension_api::serde_json::Value>> {
|
||||
let settings = LspSettings::for_worktree(server_id.as_ref(), worktree)
|
||||
.ok()
|
||||
.and_then(|lsp_settings| lsp_settings.initialization_options.clone())
|
||||
.unwrap_or_default();
|
||||
Ok(Some(settings))
|
||||
}
|
||||
|
||||
fn language_server_workspace_configuration(
|
||||
&mut self,
|
||||
server_id: &LanguageServerId,
|
||||
|
|
Loading…
Reference in a new issue