From 8770c61d4063483f5ed253cddd5f3a5fa6ad5333 Mon Sep 17 00:00:00 2001 From: Emmet Date: Sat, 25 Oct 2025 14:46:42 -0500 Subject: [PATCH] Zed is really cool!! --- hosts/snowfire/home.nix | 6 +++--- modules/user/editor/default.nix | 3 ++- modules/user/emacs/init.el | 3 +-- modules/user/hyprland/default.nix | 1 + modules/user/zed/default.nix | 23 +++++++++++++++++++++++ 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/hosts/snowfire/home.nix b/hosts/snowfire/home.nix index 2dee963..33e7cbf 100644 --- a/hosts/snowfire/home.nix +++ b/hosts/snowfire/home.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: { config = { @@ -13,8 +13,8 @@ # programs browser = "brave"; - editor = "emacs"; - zed.enable = true; + editor = "zed"; + emacs.enable = true; vscodium.enable = true; yazi.enable = true; git.enable = true; diff --git a/modules/user/editor/default.nix b/modules/user/editor/default.nix index 65bf300..3781c8a 100644 --- a/modules/user/editor/default.nix +++ b/modules/user/editor/default.nix @@ -28,8 +28,9 @@ in { (lib.mkIf (editor == "emacs") "emacsclient -c -n -a 'emacs'") (lib.mkIf (editor == "neovide") "neovide -- --listen /tmp/nvimsocket") (lib.mkIf (editor == "vscodium") "codium -n") + (lib.mkIf (editor == "zed") "zeditor") (lib.mkIf (builtins.elem editor [ "vim" "nvim" "nano" "micro" ]) ("exec " + term + " -e " + editor)) - (lib.mkIf (!(builtins.elem editor [ "emacs" "vim" "nvim" "neovide" "nano" "micro" "vscodium"])) editor) + (lib.mkIf (!(builtins.elem editor [ "emacs" "vim" "nvim" "neovide" "nano" "micro" "vscodium" "zed"])) editor) ]; home.sessionVariables = { EDITOR = diff --git a/modules/user/emacs/init.el b/modules/user/emacs/init.el index 0cc4880..8ca4322 100644 --- a/modules/user/emacs/init.el +++ b/modules/user/emacs/init.el @@ -78,8 +78,7 @@ (set-face-background 'fringe (face-attribute 'default :background)) ;; Fira and glyphs - (when (window-system) - (set-frame-font "FiraCode Nerd Font")) + (set-frame-font "FiraCode Nerd Font") (let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)") (35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)") (36 . ".\\(?:>\\)") diff --git a/modules/user/hyprland/default.nix b/modules/user/hyprland/default.nix index 13fe522..48bc848 100644 --- a/modules/user/hyprland/default.nix +++ b/modules/user/hyprland/default.nix @@ -374,6 +374,7 @@ in "tile,title:(Godot)" "suppressevent maximize,class:^(steam)$" ] ++ lib.optionals (!performance) [ + "opacity 0.80,class:^(dev.zed.Zed)$" "opacity 0.80,class:^(org.pulseaudio.pavucontrol)$" "opacity 1.0,class:^(org.qutebrowser.qutebrowser),fullscreen:1" "opacity 0.85,class:^(Element)$" diff --git a/modules/user/zed/default.nix b/modules/user/zed/default.nix index da15b5c..409115b 100644 --- a/modules/user/zed/default.nix +++ b/modules/user/zed/default.nix @@ -10,10 +10,33 @@ in { }; config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + gitu nixd + ]; + stylix.targets.zed.enable = true; programs.zed-editor.enable = true; programs.zed-editor.extensions = [ "nix" "gdscript" + "git_firefly" + "toml" + "xml" + "svelte" + "vue" + "scss" + "make" + "dockerfile" + "docker-compose" + "hyprlang" + "java" + "lua" + "r" + "kotlin" + "haskell" + "perl" + "fortran" + "ruby" + "org" ]; }; }