mirror of
https://github.com/vadimmelnicuk/meo.git
synced 2026-05-03 12:40:38 +00:00
6.0 KiB
6.0 KiB
MEO Theming Guide
Guide on how to customise colors, syntax highlighting, fonts, heading sizes, and line-height in Markdown Editor Optimized.
Quick Start
- Start from a built-in preset (
Select Theme). - Export JSON (
Export Theme JSON). - Change only what you need (usually a few colors or token overrides).
- Import the file (
Import Theme JSON). - If needed, recover quickly with
Reset Theme to Default.
Built-In Themes
- One Monokai (default)
- One Dark Pro
- Dracula
- Gruvbox
- Nord
- Solarized Dark
- Catppuccin Mocha
- Tokyo Night
- GitHub Dark
Commands
Markdown Editor Optimized: Select ThemeMarkdown Editor Optimized: Import Theme JSONMarkdown Editor Optimized: Export Theme JSONMarkdown Editor Optimized: Delete Imported ThemeMarkdown Editor Optimized: Reset Theme to Default
id
id is the theme's stable identifier.
- Used by theme selection/import/delete flows to identify the exact theme.
- Should be unique across your presets/imports (kebab-case like
my-themeis recommended). - If you change
id, MEO treats it as a different theme entry.
name
name is the human-readable label for the theme.
- Display-only metadata (it does not change color/font rendering).
- Can be changed safely without affecting how the theme looks.
- Keep it concise so it is easy to distinguish in the theme picker.
colors
colors is the 9-color base palette (base01 to base09) that drives the theme.
base01is the main foreground color; the rest are accent/palette slots used across UI and token defaults.- These values are used directly and also seed default syntax token colors.
- Every key from
base01tobase09must be present after validation/resolution. - Color values must be valid
#hex,rgb()/rgba(),hsl()/hsla(), orvar(--...).
syntaxTokens
Each key in syntaxTokens maps to a syntax category. Color values must use #hex, rgb()/rgba(), hsl()/hsla(), or var(--...).
Code Syntax Highlighting:
keyword: Language keywords likeif,return,class,import.identifier: Generic names and unresolved identifiers.macroName: Macro identifiers (for languages that support macros).variableName: Variable names in normal usage.propertyName: Object/struct property and field names.typeName: Type names (for examplestring,User,Result).className: Class identifiers.namespace: Namespace/module-like names.operator: Operators such as+,-,=,=>.operatorKeyword: Word operators likein,instanceof,as.punctuation: Brackets, braces, commas, colons, and similar punctuation.functionName: Function names in call sites.labelName: Labels (for example loop/switch labels).definitionFunction: Function names at declaration/definition sites.definedVariable: Variable names at declaration/definition sites.number: Numeric literals.annotation: Annotation/decorator syntax.modifier: Modifiers likepublic,static,readonly.self: Self-reference keywords (this,self, etc.).color: Color literals/tokens when a language marks them.constant: Named constants and standard constants.atom: Atom-like literals (language-defined symbolic literals).bool: Boolean literals (true,false).specialVariable: Built-in or special-purpose variables.specialString: Special string forms (for example escapes/template forms).regexp: Regular-expression literals.string: Standard string literals.typeDefinition: Type names at type-definition sites.meta: Metadata-ish tokens (pragma/directive-like syntax).comment: Comments and doc comments.invalid: Invalid/error tokens.deleted: Deleted/removed tokens when marked by parser/highlighter.changed: Changed/diff-like tokens when present in a grammar.
Markdown:
heading: Markdown/markup heading text.emphasis: Emphasized/italic text.strong: Strong/bold text.strikethrough: Strikethrough text.quote: Blockquote/quote content.contentSeparator: Content separators (for example thematic breaks).link: Link text tokens.url: URL tokens.monospace: Monospace/code-style inline content tokens.tagName: Markup tag names (HTML/XML/MDX style).attributeName: Markup attribute names.processingInstruction: Processing-instruction-like tokens in markup grammars.
fonts
fonts controls typography in live/source editors and heading/line-height behavior.
liveFont: Font family for rendered markdown text.sourceFont: Font family for source/code text (also used for inline code and code blocks in Live mode).liveFontWeight: Font weight for live mode text. Free-form CSS font-weight values (for examplenormal,bold,500,600).sourceFontWeight: Font weight for source mode text (and monospaced token rendering in both export and Live mode code areas).liveFontSize: Live mode font size (null= use VS Code editor font size).sourceFontSize: Source mode font size (null= use VS Code editor font size).h1FontSizetoh6FontSize: Optional heading size overrides (null= use defaults). Heading font sizes are inemunits and must be between1and3when provided.liveLineHeightandsourceLineHeight: Line-height for each mode (must be between1and3).
Defaults and Fallbacks
- Empty syntax token color (
"") falls back to that token's palette-derived default. - Empty
fonts.liveFontorfonts.sourceFontfalls back to VS Code editor font family. fonts.liveFontSize: nullandfonts.sourceFontSize: nullfall back to VS Code editor font size.- Empty
fonts.liveFontWeightorfonts.sourceFontWeightfalls back to VS Code editor font weight. fonts.h1FontSizetofonts.h6FontSizedefault to1.6,1.5,1.3,1.2,1.1, and1respectively (andnullfalls back to those defaults).- In Live mode, inline code and code blocks use
fonts.sourceFont(notfonts.liveFont). - Export is mode-independent: body text uses
liveFontSize, and code/monospace text usessourceFontSize.