diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs index c9415d1d5..b4b2fe6a4 100644 --- a/helix-core/src/indent.rs +++ b/helix-core/src/indent.rs @@ -24,9 +24,9 @@ pub enum IndentStyle { Spaces(u8), } -// 16 spaces -const INDENTS: &str = " "; -pub const MAX_INDENT: u8 = 16; +// 128 spaces +const INDENTS: &str = " "; +pub const MAX_INDENT: u8 = 128; impl IndentStyle { /// Creates an `IndentStyle` from an indentation string. diff --git a/helix-core/src/syntax/config.rs b/helix-core/src/syntax/config.rs index 432611bb0..2b89cba30 100644 --- a/helix-core/src/syntax/config.rs +++ b/helix-core/src/syntax/config.rs @@ -1,4 +1,4 @@ -use crate::{auto_pairs::AutoPairs, diagnostic::Severity, Language}; +use crate::{auto_pairs::AutoPairs, diagnostic::Severity, indent::MAX_INDENT, Language}; use globset::GlobSet; use helix_stdx::rope; @@ -595,12 +595,13 @@ where D: serde::Deserializer<'de>, { usize::deserialize(deserializer).and_then(|n| { - if n > 0 && n <= 16 { + if n > 0 && n <= MAX_INDENT.into() { Ok(n) } else { - Err(serde::de::Error::custom( - "tab width must be a value from 1 to 16 inclusive", - )) + Err(serde::de::Error::custom(format!( + "tab width must be a value from 1 to {} inclusive", + MAX_INDENT + ))) } }) }