fix(lsp): include unstable features from editor settings (#26655)

This commit is contained in:
Nayeem Rahman 2024-10-31 10:52:43 +00:00 committed by GitHub
parent 8bfd134da6
commit 2f0c25d33f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 30 additions and 26 deletions

View file

@ -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();