Use NonZeroU32 to ensure settings tabsize cannot be zero

This commit is contained in:
Keith Simmons
2022-06-23 12:55:38 -07:00
parent 1720933597
commit 755636d10e
11 changed files with 83 additions and 58 deletions
+2 -2
View File
@@ -2848,7 +2848,7 @@ impl Project {
.request::<lsp::request::Formatting>(lsp::DocumentFormattingParams {
text_document,
options: lsp::FormattingOptions {
tab_size,
tab_size: tab_size.into(),
insert_spaces: true,
insert_final_newline: Some(true),
..Default::default()
@@ -2870,7 +2870,7 @@ impl Project {
text_document,
range: lsp::Range::new(buffer_start, buffer_end),
options: lsp::FormattingOptions {
tab_size,
tab_size: tab_size.into(),
insert_spaces: true,
insert_final_newline: Some(true),
..Default::default()