Make `format_selections` respect document configuration (#11169)

pull/7109/merge
arcofx 4 months ago committed by GitHub
parent 079f544260
commit 1bad3b0dd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4523,7 +4523,11 @@ fn format_selections(cx: &mut Context) {
.text_document_range_formatting(
doc.identifier(),
range,
lsp::FormattingOptions::default(),
lsp::FormattingOptions {
tab_size: doc.tab_width() as u32,
insert_spaces: matches!(doc.indent_style, IndentStyle::Spaces(_)),
..Default::default()
},
None,
)
.unwrap();

Loading…
Cancel
Save