diff options
author | Blaž Hrastnik | 2022-03-30 06:18:50 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-03-30 06:19:21 +0000 |
commit | c18de0e8f001041e234b2b9bb0f8fea122858ad3 (patch) | |
tree | ab77cb28bdc13ecdb6227bfc3e7dd90d2cfb15af /helix-view/src/document.rs | |
parent | 8702aaaefcc3a069947b4e52a9c1f57868f32b5c (diff) |
fix: Don't rely on FormattingOptions::default()
Refs #1884
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r-- | helix-view/src/document.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 671ceb75..c9c1e502 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -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, )?; |