diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2024-10-31 10:52:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 10:52:43 +0000 |
commit | 2f0c25d33fc0c8bb8e6e92826b2549f429d68d42 (patch) | |
tree | a80efeb107d3720a5f1ae528955f76549cb913b4 /cli/lsp/language_server.rs | |
parent | 8bfd134da6d730cc1d182ab430b1713901d7a5b5 (diff) |
fix(lsp): include unstable features from editor settings (#26655)
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r-- | cli/lsp/language_server.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 33ae539f8..a592245ce 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -1384,14 +1384,10 @@ impl Inner { .clone(); fmt_options.use_tabs = Some(!params.options.insert_spaces); fmt_options.indent_width = Some(params.options.tab_size as u8); - let maybe_workspace = self - .config - .tree - .data_for_specifier(&specifier) - .map(|d| &d.member_dir.workspace); + let config_data = self.config.tree.data_for_specifier(&specifier); let unstable_options = UnstableFmtOptions { - component: maybe_workspace - .map(|w| w.has_unstable("fmt-component")) + component: config_data + .map(|d| d.unstable.contains("fmt-component")) .unwrap_or(false), }; let document = document.clone(); |