zed icon indicating copy to clipboard operation
zed copied to clipboard

Local themes not loading

Open feelingsonice opened this issue 1 year ago • 13 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Local theme not loading after placed into ~/.config/zed/themes as instructed here

Environment

Zed: v0.154.3 (Zed) OS: macOS 15.1.0 Memory: 96 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screenshot 2024-09-27 at 11 29 02 PM

If applicable, attach your Zed.log file to this issue.

Nothing useful

feelingsonice avatar Sep 28 '24 06:09 feelingsonice

Hey @feelingsonice - I'm not able to reproduce this. I dont have access to those theme files, but is it possible the names they use in the name field in the json isn't the same as the name of the file? Open one of those theme files up and see what they named the theme based off of the name and try looking the theme up via that text.

JosephTLyons avatar Oct 01 '24 20:10 JosephTLyons

@JosephTLyons it's any files here https://zed-themes.com

Don't think it's anything related to the names.

feelingsonice avatar Oct 01 '24 20:10 feelingsonice

@JosephTLyons After importing Iceberg theme from https://gist.github.com/Demonstrandum/487f1939915d047f945f094b75104c15

While Zed is open on Ubuntu I have access to the theme. However after restarting Zed. The themes selector doesn't allow them to be sourced.

ppotara avatar Oct 01 '24 22:10 ppotara

Oh interesting. I can't see the themes at all on Mac, even after restarting :( Also tried manually setting it to the target theme in my settings and didn't work.

feelingsonice avatar Oct 01 '24 22:10 feelingsonice

+1 for this issue, running on popos, not able to see custom themes in the themes folder

biohackerellie avatar Oct 02 '24 15:10 biohackerellie

Very strange, I just downloaded Catbox.json from zed-themes and it was available in Zed without even restarting. Wonder if its a Sequoia bug or something.

JosephTLyons avatar Oct 02 '24 20:10 JosephTLyons

Still not fixed for me

feelingsonice avatar Oct 10 '24 18:10 feelingsonice

I had the same problem, and I fixed it by adding this line at the very top of my JSON: "$schema": "https://zed.dev/schema/themes/v0.1.0.sjon", So maybe check that your JSON structure is correct or/and look at a theme json file on zed theme.

pixilie avatar Oct 10 '24 19:10 pixilie

Just thought I'd share that I was running into this exact same issue using themes I'd generated from VS Code via the theme importer. I then went and manually added the author field to them and that instantly fixed the issue :shrug:

calebcartwright avatar Oct 15 '24 19:10 calebcartwright

I had the same problem, and I fixed it by adding this line at the very top of my JSON: "$schema": "https://zed.dev/schema/themes/v0.1.0.sjon", So maybe check that your JSON structure is correct or/and look at a theme json file on zed theme.

Tried this and it didn't help too.

regisrex avatar Nov 12 '24 20:11 regisrex

For me, what fixed the issue was to ensure that the theme's JSON was placed under the theme root directly, not in a subfolder of the themes folder.

Put your theme json here: ~/.config/zed/themes/ NOT here: ~/.config/zed/themes/myTheme/.

If i put the theme's JSON in the theme root and adhere to the naming schema, it seems to be loadable after a Zed restart. This persists across system restarts, too.

I attach an example of a custom theme I made, in case anyone finds it helpful. The theme itself is just Gruvbox Dark with some background color changes. I have it as a json located at ~/.config/zed/themes/shelomoh.json. It loads fine on Garuda Linux:

Click to expand
{
  "$schema": "https://zed.dev/schema/themes/v0.1.0.json",
  "name": "Shelomoh",
  "author": "Haraven",
  "themes": [
    {
      "name": "Shelomoh",
      "appearance": "dark",
      "accents": [
        "#cc241dff",
        "#98971aff",
        "#d79921ff",
        "#458588ff",
        "#b16286ff",
        "#689d6aff",
        "#d65d0eff"
      ],
      "style": {
        "border": "#282828ff",
        "border.variant": "#1d1d1fff",
        "border.focused": "#303a36ff",
        "border.selected": "#303a36ff",
        "border.transparent": "#00000000",
        "border.disabled": "#544c48ff",
        "elevated_surface.background": "#1d1d1fff",
        "surface.background": "#1d1d1fff",
        "background": "#1d1d1fff",
        "element.background": "#1d1d1fff",
        "element.hover": "#1d1d1fff",
        "element.active": "#5b524cff",
        "element.selected": "#5b524cff",
        "element.disabled": "#1d1d1fff",
        "drop_target.background": "#c5b59780",
        "ghost_element.background": "#00000000",
        "ghost_element.hover": "#1d1d1fff",
        "ghost_element.active": "#5b524cff",
        "ghost_element.selected": "#5b524cff",
        "ghost_element.disabled": "#1d1d1fff",
        "text": "#fbf1c7ff",
        "text.muted": "#c5b597ff",
        "text.placeholder": "#998b78ff",
        "text.disabled": "#998b78ff",
        "text.accent": "#83a598ff",
        "icon": "#fbf1c7ff",
        "icon.muted": "#c5b597ff",
        "icon.disabled": "#998b78ff",
        "icon.placeholder": "#c5b597ff",
        "icon.accent": "#83a598ff",
        "status_bar.background": "#1d1d1fff",
        "title_bar.background": "#1d1d1fff",
        "title_bar.inactive_background": "#1d1d1fff",
        "toolbar.background": "#1d1d1fff",
        "tab_bar.background": "#1d1d1fff",
        "tab.inactive_background": "#1d1d1fff",
        "tab.active_background": "#1d1d1fff",
        "search.match_background": "#83a59866",
        "panel.background": "#1d1d1fff",
        "panel.focused_border": null,
        "pane.focused_border": null,
        "scrollbar.thumb.background": "#fbf1c74c",
        "scrollbar.thumb.hover_background": "#1d1d1fff",
        "scrollbar.thumb.border": "#1d1d1fff",
        "scrollbar.track.background": "#00000000",
        "scrollbar.track.border": "#373432ff",
        "editor.foreground": "#ebdbb2ff",
        "editor.background": "#1d1d1fff",
        "editor.gutter.background": "#1d1d1fff",
        "editor.subheader.background": "#1d1d1fff",
        "editor.active_line.background": "#3a3735bf",
        "editor.highlighted_line.background": "#1d1d1fff",
        "editor.line_number": "#fbf1c759",
        "editor.active_line_number": "#fbf1c7ff",
        "editor.invisible": "#928474ff",
        "editor.wrap_guide": "#fbf1c70d",
        "editor.active_wrap_guide": "#fbf1c71a",
        "editor.document_highlight.read_background": "#83a5981a",
        "editor.document_highlight.write_background": "#92847466",
        "terminal.background": "#1d1d1fff",
        "terminal.foreground": "#fbf1c7ff",
        "terminal.bright_foreground": "#fbf1c7ff",
        "terminal.dim_foreground": "#1d1d1fff",
        "terminal.ansi.black": "#1d1d1fff",
        "terminal.ansi.bright_black": "#73675eff",
        "terminal.ansi.dim_black": "#fbf1c7ff",
        "terminal.ansi.red": "#fb4a35ff",
        "terminal.ansi.bright_red": "#93201dff",
        "terminal.ansi.dim_red": "#ffaa95ff",
        "terminal.ansi.green": "#b7bb26ff",
        "terminal.ansi.bright_green": "#605c1bff",
        "terminal.ansi.dim_green": "#e0dc98ff",
        "terminal.ansi.yellow": "#f9bd2fff",
        "terminal.ansi.bright_yellow": "#91611bff",
        "terminal.ansi.dim_yellow": "#fedc9bff",
        "terminal.ansi.blue": "#83a598ff",
        "terminal.ansi.bright_blue": "#414f4aff",
        "terminal.ansi.dim_blue": "#c0d2cbff",
        "terminal.ansi.magenta": "#a89984ff",
        "terminal.ansi.bright_magenta": "#514a41ff",
        "terminal.ansi.dim_magenta": "#d2cabfff",
        "terminal.ansi.cyan": "#8ec07cff",
        "terminal.ansi.bright_cyan": "#45603eff",
        "terminal.ansi.dim_cyan": "#c7dfbdff",
        "terminal.ansi.white": "#fbf1c7ff",
        "terminal.ansi.bright_white": "#fbf1c7ff",
        "terminal.ansi.dim_white": "#b0a189ff",
        "link_text.hover": "#83a598ff",
        "conflict": "#f9bd2fff",
        "conflict.background": "#572e10ff",
        "conflict.border": "#754916ff",
        "created": "#b7bb26ff",
        "created.background": "#322b11ff",
        "created.border": "#4a4516ff",
        "deleted": "#fb4a35ff",
        "deleted.background": "#590a0fff",
        "deleted.border": "#771617ff",
        "error": "#fb4a35ff",
        "error.background": "#590a0fff",
        "error.border": "#771617ff",
        "hidden": "#998b78ff",
        "hidden.background": "#1d1d1fff",
        "hidden.border": "#544c48ff",
        "hint": "#8c957dff",
        "hint.background": "#1e2321ff",
        "hint.border": "#303a36ff",
        "ignored": "#998b78ff",
        "ignored.background": "#1d1d1fff",
        "ignored.border": "#5b534dff",
        "info": "#83a598ff",
        "info.background": "#1e2321ff",
        "info.border": "#303a36ff",
        "modified": "#f9bd2fff",
        "modified.background": "#572e10ff",
        "modified.border": "#754916ff",
        "predictive": "#717363ff",
        "predictive.background": "#322b11ff",
        "predictive.border": "#4a4516ff",
        "renamed": "#83a598ff",
        "renamed.background": "#1e2321ff",
        "renamed.border": "#303a36ff",
        "success": "#b7bb26ff",
        "success.background": "#322b11ff",
        "success.border": "#4a4516ff",
        "unreachable": "#c5b597ff",
        "unreachable.background": "#1d1d1fff",
        "unreachable.border": "#5b534dff",
        "warning": "#f9bd2fff",
        "warning.background": "#572e10ff",
        "warning.border": "#754916ff",
        "players": [
          {
            "cursor": "#83a598ff",
            "background": "#83a598ff",
            "selection": "#83a5983d"
          },
          {
            "cursor": "#a89984ff",
            "background": "#a89984ff",
            "selection": "#a899843d"
          },
          {
            "cursor": "#fd801bff",
            "background": "#fd801bff",
            "selection": "#fd801b3d"
          },
          {
            "cursor": "#d3869bff",
            "background": "#d3869bff",
            "selection": "#d3869b3d"
          },
          {
            "cursor": "#8ec07cff",
            "background": "#8ec07cff",
            "selection": "#8ec07c3d"
          },
          {
            "cursor": "#fb4a35ff",
            "background": "#fb4a35ff",
            "selection": "#fb4a353d"
          },
          {
            "cursor": "#f9bd2fff",
            "background": "#f9bd2fff",
            "selection": "#f9bd2f3d"
          },
          {
            "cursor": "#b7bb26ff",
            "background": "#b7bb26ff",
            "selection": "#b7bb263d"
          }
        ],
        "syntax": {
          "attribute": {
            "color": "#83a598ff",
            "font_style": null,
            "font_weight": null
          },
          "boolean": {
            "color": "#d3869bff",
            "font_style": null,
            "font_weight": null
          },
          "comment": {
            "color": "#a89984ff",
            "font_style": null,
            "font_weight": null
          },
          "comment.doc": {
            "color": "#c6b697ff",
            "font_style": null,
            "font_weight": null
          },
          "constant": {
            "color": "#fabd2eff",
            "font_style": null,
            "font_weight": null
          },
          "constructor": {
            "color": "#83a598ff",
            "font_style": null,
            "font_weight": null
          },
          "embedded": {
            "color": "#8ec07cff",
            "font_style": null,
            "font_weight": null
          },
          "emphasis": {
            "color": "#83a598ff",
            "font_style": null,
            "font_weight": null
          },
          "emphasis.strong": {
            "color": "#83a598ff",
            "font_style": null,
            "font_weight": 700
          },
          "enum": {
            "color": "#fe7f18ff",
            "font_style": null,
            "font_weight": null
          },
          "function": {
            "color": "#b8bb25ff",
            "font_style": null,
            "font_weight": null
          },
          "function.builtin": {
            "color": "#fb4833ff",
            "font_style": null,
            "font_weight": null
          },
          "hint": {
            "color": "#8c957dff",
            "font_style": null,
            "font_weight": 700
          },
          "keyword": {
            "color": "#fb4833ff",
            "font_style": null,
            "font_weight": null
          },
          "label": {
            "color": "#83a598ff",
            "font_style": null,
            "font_weight": null
          },
          "link_text": {
            "color": "#8ec07cff",
            "font_style": "italic",
            "font_weight": null
          },
          "link_uri": {
            "color": "#d3869bff",
            "font_style": null,
            "font_weight": null
          },
          "number": {
            "color": "#d3869bff",
            "font_style": null,
            "font_weight": null
          },
          "operator": {
            "color": "#8ec07cff",
            "font_style": null,
            "font_weight": null
          },
          "predictive": {
            "color": "#717363ff",
            "font_style": "italic",
            "font_weight": null
          },
          "preproc": {
            "color": "#fbf1c7ff",
            "font_style": null,
            "font_weight": null
          },
          "primary": {
            "color": "#ebdbb2ff",
            "font_style": null,
            "font_weight": null
          },
          "property": {
            "color": "#ebdbb2ff",
            "font_style": null,
            "font_weight": null
          },
          "punctuation": {
            "color": "#d5c4a1ff",
            "font_style": null,
            "font_weight": null
          },
          "punctuation.bracket": {
            "color": "#a89984ff",
            "font_style": null,
            "font_weight": null
          },
          "punctuation.delimiter": {
            "color": "#e5d5adff",
            "font_style": null,
            "font_weight": null
          },
          "punctuation.list_marker": {
            "color": "#ebdbb2ff",
            "font_style": null,
            "font_weight": null
          },
          "punctuation.special": {
            "color": "#e5d5adff",
            "font_style": null,
            "font_weight": null
          },
          "string": {
            "color": "#b8bb25ff",
            "font_style": null,
            "font_weight": null
          },
          "string.escape": {
            "color": "#c6b697ff",
            "font_style": null,
            "font_weight": null
          },
          "string.regex": {
            "color": "#fe7f18ff",
            "font_style": null,
            "font_weight": null
          },
          "string.special": {
            "color": "#d3869bff",
            "font_style": null,
            "font_weight": null
          },
          "string.special.symbol": {
            "color": "#8ec07cff",
            "font_style": null,
            "font_weight": null
          },
          "tag": {
            "color": "#8ec07cff",
            "font_style": null,
            "font_weight": null
          },
          "text.literal": {
            "color": "#83a598ff",
            "font_style": null,
            "font_weight": null
          },
          "title": {
            "color": "#b8bb25ff",
            "font_style": null,
            "font_weight": 700
          },
          "type": {
            "color": "#fabd2eff",
            "font_style": null,
            "font_weight": null
          },
          "variable": {
            "color": "#83a598ff",
            "font_style": null,
            "font_weight": null
          },
          "variant": {
            "color": "#83a598ff",
            "font_style": null,
            "font_weight": null
          }
        }
      }
    }
  ]
}

radu-corbu avatar Nov 19 '24 12:11 radu-corbu

any updates? the issue still persists for me

austin171212 avatar Feb 03 '25 21:02 austin171212

I just managed to solve it by ensuring the name matched the file name and was consistent in the JSON

{
  "$schema": "https://zed.dev/schema/themes/v0.1.0.json",
  "name": "Frontend Dark",
  "author": "Alexander",
  "themes": [
    {
      "name": "Alexander", <- Changed this to match above "name" field and match the 
                              file name
  • macOS Sequoia 15.2
  • Zed 0.177.7

Jimmy-b36 avatar Mar 13 '25 14:03 Jimmy-b36

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!

github-actions[bot] avatar Nov 05 '25 07:11 github-actions[bot]

Hi. I was having this very same issue on Zed 0.211.6 on macOS Tahoe 26.1 with a theme I downloaded from zed-themes.com. However, I was able to fix it by adding the following line as the first property of the JSON file:

{
  "$schema": "https://zed.dev/schema/themes/v0.1.0.json"
}

neozeno avatar Nov 07 '25 13:11 neozeno

For the ones who are using flatpak's zed, save the theme here: ~/.var/app/dev.zed.Zed/config/zed/themes/

This worked for me.

octokerbs avatar Nov 30 '25 07:11 octokerbs