caixa_theme/style.rs
1//! The small semantic-style enum every caixa tool agrees on.
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6pub enum Semantic {
7 /// Language keywords — `defcaixa`, `defteia`, `let`, `lambda`, etc.
8 Keyword,
9 /// Non-keyword symbols — identifiers, function names, variant names.
10 Symbol,
11 /// `:keyword-positioned` atoms.
12 KeywordArg,
13 /// `"string literals"`.
14 String,
15 /// `42`, `3.14`.
16 Number,
17 /// `#t`, `#f`, `nil`.
18 Literal,
19 /// `; comments`.
20 Comment,
21 /// Primary accent — useful for highlights, carets, focused tokens.
22 Accent,
23 /// Dim text — metadata, line numbers, help text.
24 Muted,
25
26 // Diagnostic severities.
27 Error,
28 Warning,
29 Info,
30 Hint,
31
32 // Diff decorations — used by formatter preview and lint output.
33 Added,
34 Removed,
35 Unchanged,
36}