mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-09 13:21:42 +00:00
opentui(v6): code-token scopes in the shared syntax style (highlighting was parsing but painting monochrome)
This commit is contained in:
parent
8445995321
commit
31e0adc681
1 changed files with 28 additions and 1 deletions
|
|
@ -49,7 +49,34 @@ function buildSyntaxStyle(theme: Theme): SyntaxStyle {
|
|||
'markup.quote': { fg: rgba(c.muted) },
|
||||
'markup.link': { fg: rgba(c.accent) },
|
||||
'markup.raw': { fg: rgba(c.label) },
|
||||
'markup.raw.block': { fg: rgba(c.label) }
|
||||
'markup.raw.block': { fg: rgba(c.label) },
|
||||
// ── CODE token scopes (tree-sitter highlight families; subscopes like
|
||||
// `keyword.return` fall back onto these). Without them every code token
|
||||
// rendered `default` — syntax highlighting parsed but painted monochrome
|
||||
// (glitch's report). Palette stays on existing theme tokens: keywords/
|
||||
// numbers warm accent, strings label-gold, comments muted italic,
|
||||
// functions the machinery blue, types ok-green; punctuation recedes.
|
||||
comment: { fg: rgba(c.muted), italic: true },
|
||||
keyword: { bold: true, fg: rgba(c.accent) },
|
||||
string: { fg: rgba(c.label) },
|
||||
'string.special': { fg: rgba(c.label) },
|
||||
number: { fg: rgba(c.accent) },
|
||||
boolean: { fg: rgba(c.accent) },
|
||||
constant: { fg: rgba(c.accent) },
|
||||
function: { fg: rgba(c.shellDollar) },
|
||||
'function.method': { fg: rgba(c.shellDollar) },
|
||||
constructor: { fg: rgba(c.shellDollar) },
|
||||
type: { fg: rgba(c.ok) },
|
||||
'type.builtin': { fg: rgba(c.ok) },
|
||||
attribute: { fg: rgba(c.label) },
|
||||
tag: { fg: rgba(c.accent) },
|
||||
property: { fg: rgba(c.text) },
|
||||
variable: { fg: rgba(c.text) },
|
||||
'variable.builtin': { fg: rgba(c.accent) },
|
||||
operator: { fg: rgba(c.muted) },
|
||||
punctuation: { fg: rgba(c.muted) },
|
||||
'punctuation.bracket': { fg: rgba(c.muted) },
|
||||
'punctuation.delimiter': { fg: rgba(c.muted) }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue