2017-12-07 04:29:03 +00:00
|
|
|
(defconst nixos-packages
|
2016-05-30 02:39:21 +00:00
|
|
|
'(
|
|
|
|
company
|
2017-04-19 19:09:55 +00:00
|
|
|
flycheck
|
2017-07-03 07:52:54 +00:00
|
|
|
(company-nixos-options :requires company)
|
|
|
|
(helm-nixos-options :requires helm)
|
2016-05-30 02:39:21 +00:00
|
|
|
nix-mode
|
|
|
|
nixos-options
|
|
|
|
))
|
|
|
|
|
|
|
|
(defun nixos/post-init-company ()
|
2017-01-02 05:39:04 +00:00
|
|
|
(let ((backends '(company-capf)))
|
2017-07-02 13:48:06 +00:00
|
|
|
(when (configuration-layer/package-used-p 'company-nixos-options)
|
2017-01-02 05:39:04 +00:00
|
|
|
(add-to-list 'backends 'company-nixos-options t))
|
|
|
|
(eval `(spacemacs|add-company-backends
|
|
|
|
:backends ,backends
|
|
|
|
:modes nix-mode))))
|
2016-05-30 02:39:21 +00:00
|
|
|
|
|
|
|
(defun nixos/init-company-nixos-options ()
|
|
|
|
(use-package company-nixos-options
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t))
|
2016-05-30 02:39:21 +00:00
|
|
|
|
|
|
|
(defun nixos/init-helm-nixos-options ()
|
|
|
|
(use-package helm-nixos-options
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2017-04-25 15:24:27 +00:00
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
(spacemacs/set-leader-keys
|
|
|
|
"h>" 'helm-nixos-options))))
|
2015-07-20 20:11:08 +00:00
|
|
|
|
|
|
|
(defun nixos/init-nix-mode ()
|
2017-12-07 04:29:03 +00:00
|
|
|
(use-package nix-mode
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2018-08-12 14:48:33 +00:00
|
|
|
:mode "\\.nix\\'"
|
2017-12-07 04:29:03 +00:00
|
|
|
:init
|
|
|
|
(add-to-list 'spacemacs-indent-sensitive-modes 'nix-mode)
|
|
|
|
:config
|
|
|
|
(electric-indent-mode -1)))
|
2015-07-20 20:11:08 +00:00
|
|
|
|
|
|
|
(defun nixos/init-nixos-options ()
|
2018-03-04 04:37:53 +00:00
|
|
|
(use-package nixos-options :defer t))
|
2017-04-19 19:09:55 +00:00
|
|
|
|
|
|
|
(defun nixos/post-init-flycheck ()
|
|
|
|
(spacemacs/enable-flycheck 'nix-mode))
|