nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Feature] Syntax Highlighting Theme Customization

Open akramcodez opened this issue 3 months ago • 2 comments

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 syntaxTheme key 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.

akramcodez avatar Aug 24 '26 09:08 akramcodez

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.

addyCooks avatar Aug 24 '26 11:08 addyCooks

sure @addyCooks 👍

akramcodez avatar Aug 25 '26 08:08 akramcodez