feat(editor): add Monokai Pro as built-in editor theme#269
Open
MonsieurBarti wants to merge 1 commit into
Open
feat(editor): add Monokai Pro as built-in editor theme#269MonsieurBarti wants to merge 1 commit into
MonsieurBarti wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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@uiw/codemirror-themes(already a direct dependency — no new packages added)#2d2a2e, Foreground:#fcfcfa#ff6188, Functions:#a9dc76, Strings:#ffd866#ab9df2, Types:#78dce8, Comments:#727072Wired into the theme system
src/modules/editor/lib/themes.ts— imports and exportsmonokaiProsrc/modules/settings/store.ts— adds"monokai-pro"toEDITOR_THEMESandEDITOR_THEME_LABELSVerification
pnpm exec tsc --noEmitpasses with zero errorsEDITOR_THEME_EXTmapFuture 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.