feat(file-viewer): syntax highlighting for code files and chat code blocks
Nightly Build / build (push) Successful in 8s
Nightly Build / build (push) Successful in 8s
Vendor highlight.js (core + python, javascript, typescript, json, yaml, bash) and highlight the file viewer's text kind (computed once per load) plus fenced blocks in renderMarkdown. Colors come from new --syn-* CSS variables aliased to the existing palette, so dark mode follows.
This commit is contained in:
@@ -32,6 +32,17 @@
|
||||
--radius-md: 12px;
|
||||
--radius-lg: 16px;
|
||||
|
||||
/* Syntax highlighting (consumed by hljs-theme.css). Aliases of the palette
|
||||
above, so the dark block needs no copies — var() resolves at use time. */
|
||||
--syn-comment: var(--tool-shell);
|
||||
--syn-keyword: var(--accent-hover);
|
||||
--syn-string: var(--tool-outline);
|
||||
--syn-number: var(--tool-config);
|
||||
--syn-title: var(--tool-edit);
|
||||
--syn-builtin: var(--tool-list);
|
||||
--syn-attr: var(--tool-read);
|
||||
--syn-meta: var(--tool-search);
|
||||
|
||||
/* Sidebar — warm cream */
|
||||
--sidebar-bg: #f6f0e6;
|
||||
--sidebar-hover: rgba(63, 52, 40, 0.06);
|
||||
|
||||
Reference in New Issue
Block a user