[Emacs] Add function to go to nixpkgs source

This commit is contained in:
Ivan Malison 2023-08-05 19:30:28 -06:00
parent 37b915a362
commit dcd57e5f8e

View File

@ -2623,6 +2623,10 @@ eval-last-sexp.
(progn (progn
(imalison:add-blacklist-to-major nix-mode) (imalison:add-blacklist-to-major nix-mode)
(setq nix-mode-blacklist '("all-packages.nix" "hackage-packages.nix"))) (setq nix-mode-blacklist '("all-packages.nix" "hackage-packages.nix")))
(defun imalison:goto-nixpkgs ()
(interactive)
(shell-command-to-string "nix eval --expr '<nixpkgs>' --impure")
(find-file ))
:config :config
(progn (progn
(setq nix-indent-function 'nix-indent-line))) (setq nix-indent-function 'nix-indent-line)))