diff options
Diffstat (limited to 'user/settings/emacs.nix')
-rw-r--r-- | user/settings/emacs.nix | 52 |
1 files changed, 36 insertions, 16 deletions
diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix index a65f8d8c..cc9deab6 100644 --- a/user/settings/emacs.nix +++ b/user/settings/emacs.nix @@ -6,13 +6,6 @@ let inherit (pkgs) stdenv; - nativeCompileDirectory = "${config.xdg.cacheHome}/emacs/native-compile/"; - - darwinPath = pkgs.runCommandLocal "path_helper " { } '' - eval $(/usr/libexec/path_helper) - echo -n $PATH > $out - ''; - editorScript = pkgs.writeScriptBin "edit" '' #!${pkgs.runtimeShell} if [ -z "$1" ]; then @@ -34,6 +27,11 @@ in xfuncname = "^(((;;;+ )|\\(|([ \t]+\\(((cl-|el-patch-)?def(un|var|macro|method|custom)|gb/))).*)$"; }; + services.emacs = lib.mkIf stdenv.isLinux { + enable = true; + package = config.programs.emacs.finalPackage; + client.enable = true; + }; programs.emacs = { enable = true; package = lib.mkDefault (pkgs.emacs29.override { withGTK3 = true; }); @@ -65,6 +63,7 @@ in cdg = "cd (project-root)"; }; }; + extraPackages = epkgs: (with epkgs; [ ace-link @@ -80,6 +79,7 @@ in consult-dir consult-ghq consult-eglot + consult-lsp crux dired-git-info docker-compose-mode @@ -100,6 +100,7 @@ in evil-commentary evil-embrace evil-exchange + evil-lion evil-matchit evil-mu4e evil-numbers @@ -130,6 +131,7 @@ in lsp-mode lispyville magit + magit-todos markdown-mode marginalia nerd-icons @@ -142,11 +144,16 @@ in quickrun rainbow-mode rainbow-delimiters + ssh-deploy stimmung-themes systemd tempel tempel-collection eglot-tempel + treemacs + treemacs-evil + treemacs-magit + treemacs-nerd-icons treesit-grammars.with-all-grammars treesit-auto vc-msg @@ -166,23 +173,36 @@ in --replace-fail '"prettier"' '"prettierd"' ''; }); + just-mode = self.melpaPackages.just-mode.overrideAttrs (old: { + src = pkgs.fetchFromGitHub { + owner = "alanpearce"; + repo = "just-mode.el"; + rev = "08eb25e0641b4b6d79aa39182c70b9d40c56fc02"; + sha256 = "13ccphbd95bn79pqbw6ycnfy1z8yd32swrhd1ljl7gwbhi7q6s0p"; + # date = "2024-05-01T22:22:02+02:00"; + }; + }); + treemacs-nerd-icons = self.melpaPackages.treemacs-nerd-icons.overrideAttrs (old: { + src = pkgs.fetchFromGitHub { + owner = "aaronmiller"; + repo = "treemacs-nerd-icons"; + sha256 = "171pdi5y9zym26iqi02c5p7zw9i7xxhv4csnjb7qlkkczha17jgp"; + rev = "90b4f0868eea1ea923dee97d2c5457c21a61f37a"; + # date = "2023-11-02T13:42:55-04:00"; + }; + }); lsp-mode = self.melpaPackages.lsp-mode.overrideAttrs { - LSP_USE_PLISTS = "true"; # sync with below + LSP_USE_PLISTS = "true"; # must be set in early-init }; }; extraConfig = '' - (setenv "LSP_USE_PLISTS" "true") ; sync with above (with-eval-after-load 'editorconfig - (setq editorconfig-exec-path "${pkgs.editorconfig-core-c}/bin/editorconfig")) - (when (featurep 'native-compile) - (setq native-compile-target-directory "${nativeCompileDirectory}") - (add-to-list 'native-comp-eln-load-path "${nativeCompileDirectory}" :append)) + (defvar editorconfig-exec-path "${pkgs.editorconfig-core-c}/bin/editorconfig")) '' + lib.optionalString stdenv.isDarwin '' (with-eval-after-load 'files - (setq insert-directory-program "${pkgs.coreutils-prefixed}/bin/gls")) + (defvar insert-directory-program "${pkgs.coreutils-prefixed}/bin/gls")) (with-eval-after-load 'dired - (setq dired-use-ls-dired t)) - (setq exec-path (parse-colon-path (setenv "PATH" "${pkgs.lib.readFile darwinPath}"))) + (defvar dired-use-ls-dired t)) ''; }; home.packages = with pkgs; [ |