Skip to content

Commit

Permalink
fix: Don't rely on FormattingOptions::default()
Browse files Browse the repository at this point in the history
Refs #1884
  • Loading branch information
archseer committed Mar 30, 2022
1 parent 8702aaa commit c18de0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion helix-view/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,11 @@ impl Document {
let offset_encoding = language_server.offset_encoding();
let request = language_server.text_document_formatting(
self.identifier(),
lsp::FormattingOptions::default(),
lsp::FormattingOptions {
tab_size: self.tab_width() as u32,
insert_spaces: matches!(self.indent_style, IndentStyle::Spaces(_)),
..Default::default()
},
None,
)?;

Expand Down

0 comments on commit c18de0e

Please sign in to comment.