Skip to content

Commit

Permalink
Make format_selections respect document configuration (#11169)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcofx authored Jul 15, 2024
1 parent 079f544 commit 1bad3b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1bad3b0

Please sign in to comment.