Use NonZeroU32 to ensure settings tabsize cannot be zero

This commit is contained in:
Keith Simmons 2022-06-22 17:13:52 -07:00
parent 1720933597
commit 755636d10e
11 changed files with 83 additions and 58 deletions

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()