Make format_selections
respect document configuration (#11169)
This commit is contained in:
parent
079f544260
commit
1bad3b0dd4
1 changed files with 5 additions and 1 deletions
|
@ -4523,7 +4523,11 @@ fn format_selections(cx: &mut Context) {
|
||||||
.text_document_range_formatting(
|
.text_document_range_formatting(
|
||||||
doc.identifier(),
|
doc.identifier(),
|
||||||
range,
|
range,
|
||||||
lsp::FormattingOptions::default(),
|
lsp::FormattingOptions {
|
||||||
|
tab_size: doc.tab_width() as u32,
|
||||||
|
insert_spaces: matches!(doc.indent_style, IndentStyle::Spaces(_)),
|
||||||
|
..Default::default()
|
||||||
|
},
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
Loading…
Add table
Reference in a new issue