Update lang/nix to reflect changes upstream

+ Restore nix-mode entry in auto-mode-alist
+ Add .drv entry to auto-mode-alist
+ Minor refactor for def-package! blocks
This commit is contained in:
Henrik Lissner 2018-08-13 16:07:10 +02:00
parent 5663778e36
commit e0f2c260a1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 9 additions and 5 deletions

View file

@ -1,8 +1,10 @@
;;; lang/nix/config.el -*- lexical-binding: t; -*- ;;; lang/nix/config.el -*- lexical-binding: t; -*-
(after! nix-mode (def-package! nix-mode
:mode "\\.nix\\'"
:config
(set-company-backend! 'nix-mode 'company-nixos-options) (set-company-backend! 'nix-mode 'company-nixos-options)
(map! :map nix-mode-map (map! :map nix-mode-map
:localleader :localleader
:n "f" #'nix-update-fetch :n "f" #'nix-update-fetch
@ -14,8 +16,11 @@
(:when (featurep! :completion helm) (:when (featurep! :completion helm)
:n "o" #'helm-nixos-options))) :n "o" #'helm-nixos-options)))
(def-package! nix-drv-mode
:mode "\\.drv\\'")
(def-package! nix-update (def-package! nix-update
:commands (nix-update-fetch)) :commands nix-update-fetch)
(def-package! nix-repl (def-package! nix-repl
:commands (nix-repl-show)) :commands nix-repl-show)

View file

@ -2,7 +2,6 @@
;;; lang/nix/packages.el ;;; lang/nix/packages.el
(package! nix-mode) (package! nix-mode)
(package! nix-update) (package! nix-update)
(when (featurep! :completion company) (when (featurep! :completion company)