zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.6k stars 3.04k forks source link

[linux] themes do not persist, default to One Dark #14827

Closed theinhumaneme closed 3 months ago

theinhumaneme commented 3 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I am trying to use Ayu Dark theme, the theme resets to One Dark after a while, this is an issue with the most recent build

Environment

Zed: v0.144.3 (Zed) OS: Linux Wayland fedora 40 Memory: 30 GiB Architecture: x86_64

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

No response

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

Zed.log


JosephTLyons commented 3 months ago

Hey @theinhumaneme, can you share with me your keymap.json file contents? In many cases, these issues come about when there is something misconfigured and Zed doesn't know how to parse the data, so the settings are dropped - maybe that is the case here.

theinhumaneme commented 3 months ago

I do not have any keymap.json file setup here is my settings.json file

// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
  "theme": "Ayu Dark",
  "ui_font_size": 17,
  "buffer_font_size": 17,
  "lsp": {
    "$LANGUAGE_SERVER_NAME": {
      "initialization_options": {
        "preferences": {
          "includeInlayParameterNameHints": "all",
          "includeInlayParameterNameHintsWhenArgumentMatchesName": true,
          "includeInlayFunctionParameterTypeHints": true,
          "includeInlayVariableTypeHints": true,
          "includeInlayVariableTypeHintsWhenTypeMatchesName": true,
          "includeInlayPropertyDeclarationTypeHints": true,
          "includeInlayFunctionLikeReturnTypeHints": true,
          "includeInlayEnumMemberValueHints": true
        }
      }
    }
  }
  "format_on_save": "language_server",
  "autosave": "on_focus_change",
  "inline_completions": {
    "disabled_globs": [
      ".env"
    ]
  },
  "current_line_highlight": "line",
  "scrollbar": {
    "show": "auto",
    "cursors": true,
    "git_diff": true,
    "search_results": true,
    "selected_symbol": true,
    "diagnostics": true
  },
  "enable_language_server": true,
  "formatter": "auto",
  "indent_guides": {
    "enabled": true,
    "coloring": "indent_aware",
    "background_coloring": "indent_aware"
  },
  "git": {
    "inline_blame": {
      "enabled": true
    }
  },
  "inlay_hints": {
    "enabled": true,
    "show_type_hints": true,
    "show_parameter_hints": true,
    "show_other_hints": true,
    "edit_debounce_ms": 700,
    "scroll_debounce_ms": 50
  },
  "journal": {
    "path": "~",
    "hour_format": "hour12"
  },
  "show_whitespaces": "all",
  "terminal": {
    "blinking": "terminal_controlled",
    "copy_on_select": true,
    "button": true,
    "toolbar": {
      "title": true
    },
    "working_directory": "current_project_directory",
  }
}
maxdeviant commented 3 months ago

@theinhumaneme It looks like there's a common missing at the end of the "lsp" block:

{
  "theme": "Ayu Dark",
  "ui_font_size": 17,
  "buffer_font_size": 17,
  "lsp": {
    "$LANGUAGE_SERVER_NAME": {
      "initialization_options": {
        "preferences": {
          "includeInlayParameterNameHints": "all",
          "includeInlayParameterNameHintsWhenArgumentMatchesName": true,
          "includeInlayFunctionParameterTypeHints": true,
          "includeInlayVariableTypeHints": true,
          "includeInlayVariableTypeHintsWhenTypeMatchesName": true,
          "includeInlayPropertyDeclarationTypeHints": true,
          "includeInlayFunctionLikeReturnTypeHints": true,
          "includeInlayEnumMemberValueHints": true
        }
      }
    }
  }, // <-- Comma was missing here.
  "format_on_save": "language_server",
  "autosave": "on_focus_change",
  "inline_completions": {
    "disabled_globs": [
      ".env"
    ]
  },
  "current_line_highlight": "line",
  "scrollbar": {
    "show": "auto",
    "cursors": true,
    "git_diff": true,
    "search_results": true,
    "selected_symbol": true,
    "diagnostics": true
  },
  "enable_language_server": true,
  "formatter": "auto",
  "indent_guides": {
    "enabled": true,
    "coloring": "indent_aware",
    "background_coloring": "indent_aware"
  },
  "git": {
    "inline_blame": {
      "enabled": true
    }
  },
  "inlay_hints": {
    "enabled": true,
    "show_type_hints": true,
    "show_parameter_hints": true,
    "show_other_hints": true,
    "edit_debounce_ms": 700,
    "scroll_debounce_ms": 50
  },
  "journal": {
    "path": "~",
    "hour_format": "hour12"
  },
  "show_whitespaces": "all",
  "terminal": {
    "blinking": "terminal_controlled",
    "copy_on_select": true,
    "button": true,
    "toolbar": {
      "title": true
    },
    "working_directory": "current_project_directory",
  }
}
theinhumaneme commented 3 months ago

Ah okay, I will test and let you know, Thank you and sorry for such a silly mistake

JosephTLyons commented 3 months ago

No worries @theinhumaneme, it's easy to do. The following settings-related issues might be things for cast your upvotes onto:

theinhumaneme commented 3 months ago

I think that solves the issue, thank you for your support and sharing the resources, I am closing this issue :D