Refactor lang/nix
+ Move set-company-backend! out of conditional (it is an autodef, meaning it will simply no-op if the company module is disabled) + Removed helm-nixos-options config, because `helm-nixos-options` is already autoloaded by the package + Simplify map! usage + Move nix-mode to the top, as it is the focal package of this module
This commit is contained in:
parent
bd5d305e06
commit
7a81f46b39
1 changed files with 10 additions and 18 deletions
|
@ -1,16 +1,8 @@
|
|||
;;; config.el --- description -*- lexical-binding: t; -*-
|
||||
|
||||
(def-package! nix-update
|
||||
:commands (nix-update-fetch))
|
||||
|
||||
(def-package! nix-repl
|
||||
:commands (nix-repl-show))
|
||||
|
||||
(def-package! helm-nixos-options
|
||||
:when (featurep! :completion helm)
|
||||
:commands (helm-nixos-options))
|
||||
;;; lang/nix/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! nix-mode
|
||||
(set-company-backend! 'nix-mode 'company-nixos-options)
|
||||
|
||||
(map! :map nix-mode-map
|
||||
:localleader
|
||||
:n "f" #'nix-update-fetch
|
||||
|
@ -18,12 +10,12 @@
|
|||
:n "r" #'nix-repl-show
|
||||
:n "s" #'nix-shell
|
||||
:n "b" #'nix-build
|
||||
:n "u" #'nix-unpack)
|
||||
:n "u" #'nix-unpack
|
||||
(:when (featurep! :completion helm)
|
||||
:n "o" #'helm-nixos-options)))
|
||||
|
||||
(when (featurep! :completion helm)
|
||||
(map! :map nix-mode-map
|
||||
:localleader
|
||||
:n "o" #'helm-nixos-options))
|
||||
(def-package! nix-update
|
||||
:commands (nix-update-fetch))
|
||||
|
||||
(when (featurep! :completion company)
|
||||
(set-company-backend! 'nix-mode 'company-nixos-options)))
|
||||
(def-package! nix-repl
|
||||
:commands (nix-repl-show))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue