diff options
author | Leonardo Santiago <[email protected]> | 2024-08-19 09:38:29 -0300 |
---|---|---|
committer | Leonardo Santiago <[email protected]> | 2024-08-19 09:38:29 -0300 |
commit | ad31831c7c9d934aefdbec38d9c3f8a09e1d6208 (patch) | |
tree | c9907ab65d98f34b13864dd182c44ddd59073469 /modules/emacs | |
parent | 9a540319df87f8df75266dec9986e1735a44a226 (diff) |
update stuff
Diffstat (limited to 'modules/emacs')
-rw-r--r-- | modules/emacs/README.org | 29 | ||||
-rw-r--r-- | modules/emacs/eglot-booster.nix | 13 | ||||
-rw-r--r-- | modules/emacs/emacs.nix | 16 |
3 files changed, 32 insertions, 26 deletions
diff --git a/modules/emacs/README.org b/modules/emacs/README.org index a8eb7eb..20caf5e 100644 --- a/modules/emacs/README.org +++ b/modules/emacs/README.org @@ -31,7 +31,7 @@ You can also use it as a ~nixosModule~, in order to add additional packages like #+begin_src emacs-lisp :tangle yes (use-package modus-themes) ;; (use-package kanagawa-theme) -(load-theme 'modus-operandi-tinted t) +(load-theme 'tango t) (add-hook 'after-make-frame-functions (lambda (frame) @@ -74,20 +74,13 @@ Configuration to automagically open age files, and to encrypt them correctly to :config (age-file-enable)) #+end_src -** Flyspell -#+begin_src emacs-lisp :tangle yes -(use-package flyspell - :hook (org-mode . flyspell-mode) - :custom - (ispell-program-name "aspell")) -#+end_src ** All the Icons -Works through nixosModules. #+begin_src emacs-lisp :tangle yes (use-package all-the-icons) (use-package all-the-icons-completion :after all-the-icons + :after marginalia :hook (marginalia-mode . all-the-icons-completion-mode)) #+end_src ** Direnv @@ -168,19 +161,10 @@ Better help defaults (use-package which-key :config (which-key-mode)) #+end_src -** Dired +** Dirvish I wanna try some QoL addons for dired. #+begin_src emacs-lisp :tangle yes -(use-package dired - :hook (dired-mode . dired-hide-details-mode)) -(use-package dired-subtree - :after dired - :config - (add-hook 'dired-mode-hook - (lambda () (local-set-key (kbd "<tab>") #'dired-subtree-toggle)))) - -(use-package all-the-icons-dired - :hook (dired-mode . all-the-icons-dired-mode)) +(use-package dirvish) #+end_src ** Windows I wanna test out =winner-mode= @@ -196,7 +180,12 @@ I wanna test out =winner-mode= Language server support. Already comes installed but used to configure additional language servers. #+begin_src emacs-lisp :tangle yes (use-package eglot + :ensure nil :config (add-to-list 'eglot-server-programs '(nix-mode . ("nil")))) + +(use-package eglot-booster + :after eglot + :config (eglot-booster-mode)) #+end_src ** Corfu diff --git a/modules/emacs/eglot-booster.nix b/modules/emacs/eglot-booster.nix new file mode 100644 index 0000000..5d9df5a --- /dev/null +++ b/modules/emacs/eglot-booster.nix @@ -0,0 +1,13 @@ +{ trivialBuild, + fetchFromGitHub, +}: +trivialBuild { + pname = "eglot-booster"; + version = "0.1.0"; + src = fetchFromGitHub { + owner = "jdtsmith"; + repo = "eglot-booster"; + rev = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6"; + hash = "sha256-vF34ZoUUj8RENyH9OeKGSPk34G6KXZhEZozQKEcRNhs="; + }; +} diff --git a/modules/emacs/emacs.nix b/modules/emacs/emacs.nix index bb0626b..bc73977 100644 --- a/modules/emacs/emacs.nix +++ b/modules/emacs/emacs.nix @@ -9,15 +9,16 @@ let nil parallel ripgrep + emacs-lsp-booster ]; - org-tangle-elisp-blocks = (pkgs.callPackage ./org.nix {inherit pkgs; from-elisp = inputs.from-elisp;}).org-tangle ({ language, flags } : + org-tangle-elisp-blocks = (pkgs.callPackage ./org.nix {inherit pkgs; inherit (inputs) from-elisp;}).org-tangle ({ language, flags } : let is-elisp = (language == "emacs-lisp") || (language == "elisp"); is-tangle = if flags ? ":tangle" then flags.":tangle" == "yes" || flags.":tangle" == "y" else false; in is-elisp && is-tangle ); config-el = pkgs.writeText "config.el" (org-tangle-elisp-blocks (builtins.readFile ./README.org)); - emacs = (pkgs.emacsWithPackagesFromUsePackage { + emacs = pkgs.emacsWithPackagesFromUsePackage { package = pkgs.emacs.override { withGTK3 = true; withNativeCompilation = true; @@ -25,6 +26,12 @@ let withSystemd = true; withToolkitScrollBars = true; }; + override = epkgs: epkgs // { + eglot-booster = pkgs.callPackage ./eglot-booster.nix { + inherit (pkgs) fetchFromGitHub; + inherit (epkgs) trivialBuild; + }; + }; config = config-el; alwaysEnsure = true; defaultInitFile = true; @@ -34,10 +41,7 @@ let tree-sitter-python ])) ] ++ outside-emacs; - override = final: prev: { - final.buildInputs = prev.buildInputs or [] ++ outside-emacs; - }; - }); + }; in { config = { |