feat: canonicalize syntax roles + theme zsh plugins

Add authoritative `syntax:` block to both YAML specs mapping keyword,
type, function, string, constant, operator, variable, comment, and
punctuation to their semantic palette colors. Align nvim and Zed
templates to this canonical mapping (keyword=purple, type=amber,
number/bool/constant=cyan, operator=white). Fix nvim Special/SpecialChar/
Tag (were cyan; now purple/amber/blue respectively).

Add plugin color variables to zsh template: ZSH_AUTOSUGGEST uses dim
grey for ghost text; HISTORY_SUBSTRING_SEARCH uses cyan for found and
bright-red for not-found, matching the semantic palette signal system.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 00:43:52 +01:00
parent 6a815f72b3
commit e65eb8f6a4
10 changed files with 90 additions and 36 deletions

View File

@@ -115,7 +115,7 @@ function M.load()
Conditional = { fg = p.sacred },
Repeat = { fg = p.sacred },
Label = { fg = p.sacred },
Operator = { fg = p.tech }, -- Cyan (Tech)
Operator = { fg = p.text }, -- White (Neutral)
Keyword = { fg = p.sacred },
Exception = { fg = p.razor }, -- Red (Errors)
@@ -130,9 +130,9 @@ function M.load()
Structure = { fg = p.amber },
Typedef = { fg = p.amber },
Special = { fg = p.tech },
SpecialChar = { fg = p.tech },
Tag = { fg = p.tech },
Special = { fg = p.sacred }, -- Purple (special grammar tokens)
SpecialChar = { fg = p.amber }, -- Amber (escalated string variant: escapes, regex)
Tag = { fg = p.azure }, -- Blue (structural: HTML/XML tags)
Delimiter = { fg = p.dim }, -- Subtle delimiters
Debug = { fg = p.razor },

View File

@@ -115,7 +115,7 @@ function M.load()
Conditional = { fg = p.sacred },
Repeat = { fg = p.sacred },
Label = { fg = p.sacred },
Operator = { fg = p.tech }, -- Cyan (Tech)
Operator = { fg = p.text }, -- White (Neutral)
Keyword = { fg = p.sacred },
Exception = { fg = p.razor }, -- Red (Errors)
@@ -130,9 +130,9 @@ function M.load()
Structure = { fg = p.amber },
Typedef = { fg = p.amber },
Special = { fg = p.tech },
SpecialChar = { fg = p.tech },
Tag = { fg = p.tech },
Special = { fg = p.sacred }, -- Purple (special grammar tokens)
SpecialChar = { fg = p.amber }, -- Amber (escalated string variant: escapes, regex)
Tag = { fg = p.azure }, -- Blue (structural: HTML/XML tags)
Delimiter = { fg = p.dim }, -- Subtle delimiters
Debug = { fg = p.razor },

32
dist/zed/apex.json vendored
View File

@@ -197,13 +197,13 @@
"font_style": "italic"
},
"keyword": {
"color": "#00eaff"
"color": "#9d00ff"
},
"keyword.import": {
"color": "#00eaff"
"color": "#9d00ff"
},
"keyword.storage": {
"color": "#00eaff"
"color": "#9d00ff"
},
"function": {
"color": "#0088cc"
@@ -215,10 +215,10 @@
"color": "#0088cc"
},
"type": {
"color": "#9d00ff"
"color": "#ffb700"
},
"type.builtin": {
"color": "#9d00ff"
"color": "#ffb700"
},
"string": {
"color": "#00ff99"
@@ -230,13 +230,13 @@
"color": "#ffb700"
},
"number": {
"color": "#ffb700"
"color": "#00eaff"
},
"boolean": {
"color": "#ffb700"
"color": "#00eaff"
},
"constant": {
"color": "#ededed"
"color": "#00eaff"
},
"constant.builtin": {
"color": "#9d00ff"
@@ -509,13 +509,13 @@
"font_style": "italic"
},
"keyword": {
"color": "#007a88"
"color": "#7a3cff"
},
"keyword.import": {
"color": "#007a88"
"color": "#7a3cff"
},
"keyword.storage": {
"color": "#007a88"
"color": "#7a3cff"
},
"function": {
"color": "#005577"
@@ -527,10 +527,10 @@
"color": "#005577"
},
"type": {
"color": "#7a3cff"
"color": "#d18f00"
},
"type.builtin": {
"color": "#7a3cff"
"color": "#d18f00"
},
"string": {
"color": "#00b377"
@@ -542,13 +542,13 @@
"color": "#d18f00"
},
"number": {
"color": "#d18f00"
"color": "#007a88"
},
"boolean": {
"color": "#d18f00"
"color": "#007a88"
},
"constant": {
"color": "#0a0a0a"
"color": "#007a88"
},
"constant.builtin": {
"color": "#7a3cff"

View File

@@ -23,6 +23,16 @@ C[OK]="#00b377"
C[PURPLE]="#7a3cff"
C[ALERT]="#ff4d6d"
# -----------------------------------------------------------------------------
# 1b) PLUGIN COLORS
# -----------------------------------------------------------------------------
# zsh-autosuggestions: ghost text from history (subtle, intentionally dim)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#737373"
# zsh-history-substring-search
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="fg=#007a88,bold"
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND="fg=#ff4d6d,bold"
# -----------------------------------------------------------------------------
# 2) ICONS / GLYPHS (Nerd Font optional)
# -----------------------------------------------------------------------------

View File

@@ -23,6 +23,16 @@ C[OK]="#00ff99"
C[PURPLE]="#9d00ff"
C[ALERT]="#ff8899"
# -----------------------------------------------------------------------------
# 1b) PLUGIN COLORS
# -----------------------------------------------------------------------------
# zsh-autosuggestions: ghost text from history (subtle, intentionally dim)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#737373"
# zsh-history-substring-search
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="fg=#00eaff,bold"
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND="fg=#ff8899,bold"
# -----------------------------------------------------------------------------
# 2) ICONS / GLYPHS (Nerd Font optional)
# -----------------------------------------------------------------------------

View File

@@ -26,6 +26,18 @@ ui:
dim: "#737373"
stealth: "#a0a0a0"
# Syntax Token Roles (canonical mapping for all editor targets)
syntax:
keyword: "#7a3cff" # palette.special — purple, sacred structural tokens
type: "#d18f00" # palette.warning — amber, type/class definitions
function: "#005577" # palette.azure — blue, callable structure
string: "#00b377" # palette.success — green, organic string data
constant: "#007a88" # palette.info — cyan, digital values (numbers, booleans)
operator: "#0a0a0a" # palette.foreground — near black, neutral
variable: "#0a0a0a" # palette.foreground — near black, neutral
comment: "#a0a0a0" # ui.stealth — fade out
punctuation: "#737373" # ui.dim — structural noise
# ANSI Table (Terminal)
ansi:
normal:

View File

@@ -25,6 +25,18 @@ ui:
dim: "#737373" # Muted Text
stealth: "#404040" # Comments/Ignored
# Syntax Token Roles (canonical mapping for all editor targets)
syntax:
keyword: "#9d00ff" # palette.special — purple, sacred structural tokens
type: "#ffb700" # palette.warning — amber, type/class definitions
function: "#0088cc" # palette.azure — blue, callable structure
string: "#00ff99" # palette.success — green, organic string data
constant: "#00eaff" # palette.info — cyan, digital values (numbers, booleans)
operator: "#ededed" # palette.foreground — white, neutral
variable: "#ededed" # palette.foreground — white, neutral
comment: "#404040" # ui.stealth — fade out
punctuation: "#737373" # ui.dim — structural noise
# ANSI Table (Terminal)
ansi:
normal:

View File

@@ -115,7 +115,7 @@ function M.load()
Conditional = { fg = p.sacred },
Repeat = { fg = p.sacred },
Label = { fg = p.sacred },
Operator = { fg = p.tech }, -- Cyan (Tech)
Operator = { fg = p.text }, -- White (Neutral)
Keyword = { fg = p.sacred },
Exception = { fg = p.razor }, -- Red (Errors)
@@ -130,9 +130,9 @@ function M.load()
Structure = { fg = p.amber },
Typedef = { fg = p.amber },
Special = { fg = p.tech },
SpecialChar = { fg = p.tech },
Tag = { fg = p.tech },
Special = { fg = p.sacred }, -- Purple (special grammar tokens)
SpecialChar = { fg = p.amber }, -- Amber (escalated string variant: escapes, regex)
Tag = { fg = p.azure }, -- Blue (structural: HTML/XML tags)
Delimiter = { fg = p.dim }, -- Subtle delimiters
Debug = { fg = p.razor },

View File

@@ -197,13 +197,13 @@
"font_style": "italic"
},
"keyword": {
"color": "{{ s.palette.info }}"
"color": "{{ s.palette.special }}"
},
"keyword.import": {
"color": "{{ s.palette.info }}"
"color": "{{ s.palette.special }}"
},
"keyword.storage": {
"color": "{{ s.palette.info }}"
"color": "{{ s.palette.special }}"
},
"function": {
"color": "{{ s.palette.azure }}"
@@ -215,10 +215,10 @@
"color": "{{ s.palette.azure }}"
},
"type": {
"color": "{{ s.palette.special }}"
"color": "{{ s.palette.warning }}"
},
"type.builtin": {
"color": "{{ s.palette.special }}"
"color": "{{ s.palette.warning }}"
},
"string": {
"color": "{{ s.palette.success }}"
@@ -230,13 +230,13 @@
"color": "{{ s.palette.warning }}"
},
"number": {
"color": "{{ s.palette.warning }}"
"color": "{{ s.palette.info }}"
},
"boolean": {
"color": "{{ s.palette.warning }}"
"color": "{{ s.palette.info }}"
},
"constant": {
"color": "{{ s.palette.foreground }}"
"color": "{{ s.palette.info }}"
},
"constant.builtin": {
"color": "{{ s.palette.special }}"

View File

@@ -23,6 +23,16 @@ C[OK]="{{ palette.success }}"
C[PURPLE]="{{ palette.special }}"
C[ALERT]="{{ ansi.bright.red }}"
# -----------------------------------------------------------------------------
# 1b) PLUGIN COLORS
# -----------------------------------------------------------------------------
# zsh-autosuggestions: ghost text from history (subtle, intentionally dim)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg={{ ui.dim }}"
# zsh-history-substring-search
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="fg={{ palette.info }},bold"
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND="fg={{ ansi.bright.red }},bold"
# -----------------------------------------------------------------------------
# 2) ICONS / GLYPHS (Nerd Font optional)
# -----------------------------------------------------------------------------