diff --git a/config/zed/settings.json b/config/zed/settings.json index 95b2e9f2..c0aa8b41 100644 --- a/config/zed/settings.json +++ b/config/zed/settings.json @@ -22,6 +22,7 @@ "toml": true, "lua": true, "basher": true, - "base16": true + "base16": true, + "iceberg": true } } diff --git a/home-manager/common.nix b/home-manager/common.nix index d84d9954..fca7ad55 100644 --- a/home-manager/common.nix +++ b/home-manager/common.nix @@ -46,7 +46,6 @@ # Do NOT set GIT_EDITOR, it overrides `core.editor` in git config # https://unix.stackexchange.com/questions/4859/visual-vs-editor-what-s-the-difference EDITOR = lib.getExe pkgs.helix; - VISUAL = lib.getExe pkgs.helix; # vscode is heavy even if in VISUAL use PAGER = "less"; # https://github.com/sharkdp/bat/blob/v0.24.0/README.md?plain=1#L201-L219 diff --git a/home-manager/darwin.nix b/home-manager/darwin.nix index afa21dbd..2706bd82 100644 --- a/home-manager/darwin.nix +++ b/home-manager/darwin.nix @@ -3,6 +3,15 @@ # https://github.com/nix-community/home-manager/issues/414#issuecomment-427163925 lib.mkMerge [ (lib.mkIf pkgs.stdenv.isDarwin { + home = { + sessionVariables = { + # * Do not specify Nix store path for zed in macOS + # https://github.com/NixOS/nixpkgs/blob/bba8dffd3135f35810e9112c40ee621f4ede7cca/pkgs/by-name/ze/zed-editor/package.nix#L217-L219 + # * `cli: install` action installs into this path in macOS + VISUAL = "/usr/local/bin/zed --wait"; + }; + }; + # https://github.com/NixOS/nixpkgs/issues/240819#issuecomment-1616760598 # https://github.com/midchildan/dotfiles/blob/fae87a3ef327c23031d8081333678f9472e4c0ed/nix/home/modules/gnupg/default.nix#L38 xdg.dataFile."gnupg/gpg-agent.conf".text = '' diff --git a/home-manager/packages.nix b/home-manager/packages.nix index 0cc4c74c..7f9a5f0c 100644 --- a/home-manager/packages.nix +++ b/home-manager/packages.nix @@ -162,4 +162,8 @@ with pkgs; source-han-code-jp # Includes many definitions, useful for fallback inconsolata + + # Don't add zed in macOS with nixpkgs + # https://github.com/NixOS/nixpkgs/blob/bba8dffd3135f35810e9112c40ee621f4ede7cca/pkgs/by-name/ze/zed-editor/package.nix#L217-L219 + # edge-pkgs.zed-editor ]) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 26d0c2bb..a4da7e7a 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -126,7 +126,7 @@ EDITOR = lib.getExe pkgs.helix; SYSTEMD_EDITOR = lib.getExe pkgs.helix; - VISUAL = lib.getExe pkgs.helix; + VISUAL = "${lib.getExe edge-pkgs.zed-editor} --wait"; }; # List packages installed in system profile. To search, run: @@ -204,6 +204,8 @@ ## Unfree packages + # TODO: Consider using vscodium again + # TODO: Consider to drop the unuseful vscode until fixed the Wayland problems (edge-pkgs.vscode.override (prev: { # https://wiki.archlinux.org/title/Wayland#Electron # https://github.com/NixOS/nixpkgs/blob/3f8b7310913d9e4805b7e20b2beabb27e333b31f/pkgs/applications/editors/vscode/generic.nix#L207-L214