Skip to content

Commit

Permalink
Make format_selections respect document configuration (helix-editor…
Browse files Browse the repository at this point in the history
  • Loading branch information
arcofx authored and mxxntype committed Aug 14, 2024
1 parent b9c691c commit 7352e22
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 7352e22

Please sign in to comment.