refactor: convert whitespace_mode config options to an enum

This commit is contained in:
CJ van den Berg 2025-11-18 12:35:28 +01:00
parent e2009425f5
commit 3dc731d086
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 26 additions and 37 deletions

View file

@ -14,7 +14,7 @@ highlight_current_line_gutter: bool = true,
highlight_columns: []const u16 = &.{ 80, 100, 120 },
highlight_columns_alpha: u8 = 240,
highlight_columns_enabled: bool = false,
whitespace_mode: []const u8 = "none",
whitespace_mode: WhitespaceMode = .none,
inline_diagnostics: bool = true,
animation_min_lag: usize = 0, //milliseconds
animation_max_lag: usize = 50, //milliseconds
@ -103,3 +103,13 @@ pub const WidgetStyle = enum {
spacious,
compact,
};
pub const WhitespaceMode = enum {
indent,
leading,
eol,
tabs,
visible,
full,
none,
};