Themes
A theme sets the colors of the editor, the interface and syntax highlighting. Tyrn includes One, Ayu and Gruvbox themes, and you can add more from extensions or make your own.
Choose a theme
Open the theme selector with cmd-k cmd-t, or Select Theme… in the Tyrn > Settings menu. Move up and down to preview each theme live. Press enter to save your pick to settings.json.
Built in:
- One Dark and One Light
- Ayu Dark, Ayu Light and Ayu Mirage
- Gruvbox Dark, Dark Hard, Dark Soft, Light, Light Hard and Light Soft
Light and dark
Tyrn keeps one theme for light mode and one for dark mode, and follows your Mac’s appearance by default.
{ "theme": { "mode": "system", "light": "One Light", "dark": "One Dark" }}Set mode to "light" or "dark" to ignore the system setting. Press cmd-k cmd-shift-t to toggle between light and dark.
If your settings have a single theme name, such as "theme": "Ayu Dark", the first toggle changes it to the object form above using the default pair. Set light and dark yourself after that.
Install more themes
Open the Extensions view with cmd-shift-x (or tyrn: extensions), filter by Themes, and click Install. Installed themes appear in the theme selector. See Languages for how the Extensions view works.
Override theme colors
Use theme_overrides to change a few colors of a theme without copying it. The key is the theme’s name.
{ "theme_overrides": { "One Dark": { "editor.background": "#1b1d23", "syntax": { "comment": { "font_style": "italic" }, "comment.doc": { "font_style": "italic" } }, "accents": ["#ff5555", "#ffb86c", "#f1fa8c", "#50fa7b", "#8be9fd", "#bd93f9"] } }}accents sets the colors used for rainbow brackets when colorize_brackets is on. The available keys are the ones in the theme files themselves. Open a theme file and copy the key you want.
Local themes
Put a theme file in ~/.config/tyrn/themes. A file named my-cool-theme.json is picked up the next time Tyrn loads, and its themes appear in the selector. A theme file is JSON with a family name, an author, and a list of themes, each with an appearance of "light" or "dark" and a style object of colors.