Skip to content

Add Omarchy theme support for Sublime Text - #14245

Open
giuse wants to merge 15 commits into
omacom:quattrofrom
giuse:sublime-theme
Open

giuse wants to merge 15 commits into
omacom:quattrofrom
giuse:sublime-theme

Conversation

@giuse

@giuse giuse commented Oct 4, 2026 •

Copy link
Copy Markdown

Summary

Make Sublime Text belong in Omarchy.

This gives it a theme that fits in with the aesthetic like the other supported editors, follows colors and fonts, and provides a minimalistic look at install. It looks like the terminal, but has Sublime power, and provides a fair alternative to those of us who did not side with vim nor emacs (regards from Switzerland btw).

  • Generate a Sublime color scheme from the active Omarchy palette and sync it on every theme change (skip with the skip-sublime-theme-changes toggle, like VS Code).
  • Install a compact UI theme that follows the scheme: flat tabs, sidebar, quick panel, and accent-coloured focus and selection.
  • Show git changes in the gutter using the palette's green, yellow, and red.

Behaviour

  • Install (Install > Editor > Sublime Text, or picking Sublime as the default editor when it's missing) sets theme, color_scheme, and overlay_scroll_bars once, backing up any existing preferences first. It edits root-level keys only and keeps the user's comments and formatting.
  • Existing Sublime users opt in from the same menu entry, which stays enabled until the Omarchy theme is installed. Selecting an installed Sublime as the default editor does not overwrite the user's preferences.
  • Menu and minimap are hidden once after install. Sublime then keeps the user choices, in new windows and across restarts.
  • Font: Sublime's own default (Monospace) already resolves through fontconfig to the Omarchy font, so Omarchy never writes font_face. After omarchy font set, a notification asks to restart Sublime, as it does for Ghostty and Foot.
  • Theme switches only replace the generated scheme file; preferences are never rewritten.

Testing

  • Applied a fresh install from this branch to a real profile in Sublime Text 4215 and verified:
    • the UI theme and scheme render correctly;
    • the Omarchy font is loaded;
    • the menu and minimap are hidden once, and a choice to show them is kept in new windows and after a restart;
    • live switches work dark→dark, dark↔light, and repeatedly;
    • font changes appear after a restart.
  • Rendered the scheme as valid JSON for every stock theme.
  • Ran ./test/cli and the shell tests: sublime-theme, default-apps, desktop-entry-launch, and theme-staging. The preferences tests cover nested keys, non-string values, comments, and empty and malformed files.

@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no new actionable issues remain.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues remain.

Summary

Adds Sublime Text theme support:

  • Sublime starts with Omarchy's look and keeps later window choices.
  • Sublime's colors follow the active Omarchy theme.
  • Sublime users get a restart notice after a font change.

Both numbered findings are fixed. The earlier later-window finding was dismissed after giuse confirmed that Sublime Text 4215 copies the active window’s visibility choices and saves them across restarts.

Automated tests and the Sublime UI were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Install Sublime Text] --> B[Copy Omarchy UI theme and plugin]
  B --> C[Back up and update preferences]
  C --> D[Copy current color scheme]
  E[Change Omarchy theme] --> F[Generate color scheme]
  F --> G{Skip Sublime changes?}
  G -->|No| D
  G -->|Yes| H[Keep installed scheme]
Loading

Reviews (10) · Last reviewed commit: "Keep a symlinked Sublime preferences fil..." · Reviewed by Greptile

Comment thread bin/omarchy-install-editor-sublime Resolved
Comment thread default/sublime/set-preferences.py Resolved
Comment thread default/sublime/OmarchyWindow.py Resolved
Comment thread bin/omarchy-default-editor Resolved
Comment thread default/sublime/OmarchyWindow.py Resolved

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head e1fd179e2c9547a800b3e3a3855b153f4fc18cee.

[P2] Update only root-level preference keys (default/sublime/set-preferences.py:29-33). The regex searches every nesting level and replaces the first matching key. Given {"plugin_options":{"font_face":"Nested Font"},"font_face":"Original Font"}, running the actual helper with font_face=Selected Font changes the nested plugin option and leaves the real root font_face unchanged, while exiting successfully. This can both alter unrelated plugin settings and prevent Omarchy's font/theme preferences from applying. Locate root-object members with a comment/string-aware structural scan while preserving surrounding formatting, and add a nested-key regression.

The existing sublime-theme suite passed in the isolated harness. The reproduction above runs the real Python updater and exposes a case that suite does not cover. I have not run Sublime Text itself.

@jandrusk

jandrusk commented Oct 6, 2026

Copy link
Copy Markdown

Nice work on this. The live font/theme follow-through looks good. Heads-up that #10560 ("Theme Sublime Text from the Omarchy palette") has been open since September and covers the same ground: the color-scheme template, omarchy-theme-set-sublime, and the default-editor and font-set hooks. A maintainer will probably want to pick one, so it'd help to compare notes with @j-c-m on what each covers. Yours adds the UI theme and the window defaults.

Before that, the root-level-key issue from the earlier review still applies at this head. In default/sublime/set-preferences.py, the regex replaces the first matching key at any depth, so {"plugin_options":{"font_face":"x"},"font_face":"y"} updates the nested key and leaves the real font_face alone. Since Sublime prefs are JSON with comments, I'd strip comments, parse, set the top-level key, and write the file back. Or, if keeping the user's comments matters, only match keys at brace depth 1 and outside /* … */ and // comments. Greptile's points about reselecting the editor resetting font_face to monospace, and the menu and minimap being forced off on every new window, also look worth addressing.

@giuse

giuse commented Oct 6, 2026 via email

Copy link
Copy Markdown
Author

@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

No rush, and thanks for being open to changes! My suggestion, in order:

  1. Fix the nested-key issue in set-preferences.py. That's the one real bug.
  2. Leave Sublime's own defaults alone, or at least don't re-apply them on every new window, so font_face, the menu and the minimap aren't reset after a user changes them. Setting them once at install is fine.
  3. Comment on Theme Sublime Text from the Omarchy palette #10560 and work out with @j-c-m whether your UI theme and window bits could go into that PR, or the other way round. Maintainers will only take one, so one combined PR is the fastest route.

@j-c-m

j-c-m commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

@giuse we can wait for an official response, @jandrusk please add some level of disclosure.

Comment thread default/sublime/OmarchyWindow.py Resolved
Comment thread bin/omarchy-theme-set-sublime Resolved
Comment thread bin/omarchy-theme-set-sublime Resolved
@giuse

giuse commented Oct 10, 2026

Copy link
Copy Markdown
Author

Thanks @jandrusk, and @chessing234 for the precise repro. Fixed in d34882c: preferences are now edited at the root level only, keeping comments intact, with the nested-key case as a regression test.

The intent was always to apply Omarchy's defaults once at install and then respect the user's choices. Reapplying them on default-editor selection and on every new window was a mistake on my part, sorry. Both are gone now: setup runs only on install, and the menu and minimap are hidden once.

Writing font_face was unintended and pretty noob of me, since Sublime's default Monospace already resolves to the Omarchy font through fontconfig. Thanks for catching it and being so kind about something so obvious. Sublime's font setting is no longer touched at all; after omarchy font set, a notification asks to restart Sublime, as it does for Ghostty and Foot.

I also folded in a few things from #10560: gutter diff colors, the skip-sublime-theme-changes toggle, and the docs entries. I'll follow up there with @j-c-m.

@giuse
giuse requested a review from chessing234 October 10, 2026 14:10
@jandrusk

Copy link
Copy Markdown

Thanks for working through all of these. At 848045b0 the nested-key case is fixed with a regression test, setup only runs on install, and font_face is no longer written. That covers the points I raised. Coordinating the UI theme and window bits with #10560 is still a maintainer call, but the bug I flagged is resolved. LGTM from my side.

@j-c-m

j-c-m commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Thanks for working through all of these. At 848045b0 the nested-key case is fixed with a regression test, setup only runs on install, and font_face is no longer written. That covers the points I raised. Coordinating the UI theme and window bits with #10560 is still a maintainer call, but the bug I flagged is resolved. LGTM from my side.

So are you going to merge it?

Comment thread bin/omarchy-setup-sublime Resolved
@omarchybot omarchybot added the enhancement New feature or request label Oct 18, 2026
@giuse

giuse commented Oct 18, 2026

Copy link
Copy Markdown
Author

@j-c-m Nah it's a bot account with a wrong prompt. No prior contribution, no commits in Omarchy, isn't a public member of omacom, and his only PR is #13952. Its last 300 public GitHub events are all review comments on this repository, posted within 27 minutes on 13 October. Omarchy however means no gatekeeping and agents are first-class citizens, and personally I appreciate good feedback whatever the origin, so I consider myself lucky I was part of this wave :)

However @jandrusk -- I'm speaking to you, Justin, and in all kindness: sentences like "a maintainer will probably want to pick one" and "LGTM from my side", from an account with no part in the project, read as if they came from the team. Seasoned contributors can tell the difference, but newer ones often can't, and they matter a great deal to Omarchy: every user is potentially a contributor, and they deserve not to be led into treating a review as official when it isn't. It's an easy fix in the prompt: tell your agent to ensure not to be mistaken for a team member, or make an explicitly named bot account, or even simply state in your comments that it's an independent, automated review, not affiliated with the Omarchy team. Then come back and keep supporting us! I love your comments and everybody's welcome! 😁 🙌

@jandrusk

Copy link
Copy Markdown

Fair ask, thanks for raising it. To be clear: I'm not part of the Omarchy team, and my reviews here are my own independent opinions, not official project feedback. I use an AI assistant to help me draft and post review comments. Please treat them as suggestions from a community member, and the maintainers' call is what counts.

Comment thread default/sublime/set-preferences.py Resolved
Comment thread default/sublime/set-preferences.py Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants