Omarchy Theme Sync
A VS Code color theme that follows your active Omarchy theme. Switch themes with omarchy theme set (or the theme picker) and the editor recolors with it, without reloading the window.
Omarchy's own VS Code support installs a separate marketplace theme for most of its themes, so the editor only approximates the desktop. This extension builds the theme from the same colors.toml that colors foot, Hyprland and the rest of Omarchy, so the editor matches exactly. It works with every stock theme and any custom theme in ~/.config/omarchy/themes/.
What it themes
- The whole workbench: editor, side bar, tabs, panels, status bar, widgets, diffs, merge conflicts, debugging, testing and source control.
- Syntax: TextMate scopes and semantic tokens, mapped the way Omarchy maps its palette for Helix and Neovim. Keywords use
magenta, functions blue, types yellow, strings green, constants orange and properties cyan.
- The integrated terminal: uses the same 16 ANSI colors Omarchy writes for foot, Alacritty and Kitty.
- Legibility: colors are kept exactly as the theme defines them, except where one would be unreadable on its own background (for example,
muted comments in Matte Black). Those are nudged just far enough toward the foreground to read.
Install
npm run package # builds omarchy-theme-sync-<version>.vsix
codium --install-extension omarchy-theme-sync-*.vsix # or: code --install-extension …
Then run Omarchy: Use Omarchy Theme from the command palette, or pick Omarchy Sync Dark in Preferences: Color Theme.
Stop Omarchy from overriding it
On every theme switch, Omarchy's omarchy-theme-set-vscode sets each editor's workbench.colorTheme unless a skip toggle is set for that editor. The extension offers to create the toggle the first time you pick its theme. You can also create it yourself:
touch ~/.local/state/omarchy/toggles/skip-codium-theme-changes # VSCodium
touch ~/.local/state/omarchy/toggles/skip-vscode-theme-changes # VS Code
How it works
The extension contributes two themes: Omarchy Sync Dark (vs-dark base) and Omarchy Sync Light (vs base). Each is declared with _watch: true, which makes VS Code reload the theme when its file changes.
At startup and whenever Omarchy swaps ~/.local/state/omarchy/current/theme, the extension reads colors.toml and resolves it with the same fallbacks as omarchy-theme-color, so legacy color0…color15 palettes work too. It then rewrites both theme files in place, and VS Code reloads the active one.
When Omarchy moves between a dark and a light theme, the extension switches to the matching variant, so webviews and other extensions see the right theme kind. If window.autoDetectColorScheme is on, VS Code's own preferred dark and light themes decide instead; Use Omarchy Theme sets both.
Settings
| Setting |
Default |
|
omarchyThemeSync.colorsFile |
(active theme) |
Follow a different colors.toml |
omarchyThemeSync.autoSwitchVariant |
true |
Swap Dark/Light variants when Omarchy changes mode |
omarchyThemeSync.flat |
false |
Use the editor background for the side bar, activity bar and status bar instead of Omarchy's dark_background |
omarchyThemeSync.italicComments |
true |
Italic comments |
omarchyThemeSync.italicKeywords |
false |
Italic keywords |
Commands
- Omarchy: Use Omarchy Theme: select the variant matching the current Omarchy mode.
- Omarchy: Regenerate Theme from Omarchy Colors: force a rebuild, for example after editing a theme's
colors.toml in place.
Development
There are no dependencies and no build step.
npm run generate # write themes/*.json from the active Omarchy theme
npm run check # generate from every installed Omarchy theme and check color validity and contrast
lib/palette.js parses colors.toml and holds the color math.
lib/theme.js maps the palette onto VS Code colors.
extension.js watches Omarchy and rewrites the theme files.
License
MIT, see LICENSE.