nanocoder
nanocoder copied to clipboard
[Feature] Syntax Highlighting Theme Customization
Description
Allow users to define a custom syntax highlighting theme for the CLI markdown renderer via the configuration file.
Use Case
Developers are highly opinionated about their colors. If their terminal uses a specific color palette (like Dracula or Nord), the default syntax highlighting in Nanocoder might clash or be hard to read.
Proposed Solution
- Add a
syntaxThemekey to the config file (e.g.,"syntaxTheme": "dracula"). - Pass this theme string to the underlying markdown/syntax-highlighter package used by Ink.js when rendering code blocks.
Alternatives Considered
- Auto-detecting the terminal theme. This is notoriously difficult and unreliable across different OS terminals.
Additional Context
- [x] I have searched existing issues to ensure this is not a duplicate
- [x] This feature aligns with the project's goals (local-first AI assistance)
Implementation Notes (optional)
- Check which highlighter the project uses (e.g.,
cli-highlight,shiki, or chalk-based) and map the config string to the corresponding supported themes.
Hey @akramcodez, can I take this one?
Quick dig: we use cli-highlight, and all 5 call sites pass theme: 'default'.
That option wants a Theme object,
not a name so it's silently ignored and we always render the lib default.
Half feature, half dead-code fix.
sure @addyCooks 👍