Skip to content

feat(editor): add Monokai Pro as built-in editor theme#269

Open
MonsieurBarti wants to merge 1 commit into
crynta:mainfrom
MonsieurBarti:feat/monokai-pro-theme
Open

feat(editor): add Monokai Pro as built-in editor theme#269
MonsieurBarti wants to merge 1 commit into
crynta:mainfrom
MonsieurBarti:feat/monokai-pro-theme

Conversation

@MonsieurBarti
Copy link
Copy Markdown

Summary

Adds Monokai Pro as a new built-in editor theme, bringing the total to 10 themes.

Why

Monokai Pro is a popular, high-contrast dark theme that many developers prefer over the existing options. Adding it as a first-class built-in theme improves out-of-the-box UX without requiring users to maintain a fork.

What changed

  • New theme file src/modules/editor/lib/monokai-pro.ts

    • Custom CodeMirror 6 theme built with @uiw/codemirror-themes (already a direct dependency — no new packages added)
    • Color palette sourced from the official Monokai Pro spec:
      • Background: #2d2a2e, Foreground: #fcfcfa
      • Keywords: #ff6188, Functions: #a9dc76, Strings: #ffd866
      • Numbers/Constants: #ab9df2, Types: #78dce8, Comments: #727072
  • Wired into the theme system

    • src/modules/editor/lib/themes.ts — imports and exports monokaiPro
    • src/modules/settings/store.ts — adds "monokai-pro" to EDITOR_THEMES and EDITOR_THEME_LABELS

Verification

  • pnpm exec tsc --noEmit passes with zero errors
  • No runtime code changes — the theme integrates through the existing EDITOR_THEME_EXT map

Future work (out of scope)

A follow-up could introduce a custom theme loader so users can import arbitrary CM6 theme files, making Monokai Pro one use-case among many. Happy to open a separate issue/PR for that if there's interest.

Adds a new custom CodeMirror 6 theme based on the Monokai Pro color palette:
- Background: #2d2a2e, Foreground: #fcfcfa
- Keywords: #ff6188, Functions: #a9dc76, Strings: #ffd866
- Numbers/Constants: #ab9df2, Types: #78dce8, Comments: #727072

The theme is wired into the existing theme system (store.ts, themes.ts)
and requires no new dependencies since @uiw/codemirror-themes is already
a direct dependency.
@MonsieurBarti MonsieurBarti requested a review from crynta as a code owner May 15, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant