mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 20:38:55 +00:00
fix(lsp): ignore editor indent settings if deno.json is present (#26912)
This commit is contained in:
parent
19bbf83e47
commit
c36f877f8d
@ -1396,9 +1396,11 @@ impl Inner {
|
||||
.fmt_config_for_specifier(&specifier)
|
||||
.options
|
||||
.clone();
|
||||
let config_data = self.config.tree.data_for_specifier(&specifier);
|
||||
if !config_data.is_some_and(|d| d.maybe_deno_json().is_some()) {
|
||||
fmt_options.use_tabs = Some(!params.options.insert_spaces);
|
||||
fmt_options.indent_width = Some(params.options.tab_size as u8);
|
||||
let config_data = self.config.tree.data_for_specifier(&specifier);
|
||||
}
|
||||
let unstable_options = UnstableFmtOptions {
|
||||
component: config_data
|
||||
.map(|d| d.unstable.contains("fmt-component"))
|
||||
|
@ -11680,7 +11680,7 @@ fn lsp_format_with_config() {
|
||||
},
|
||||
"options": {
|
||||
"tabSize": 2,
|
||||
"insertSpaces": false
|
||||
"insertSpaces": true,
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user