lang/nix: add ivy version of helm-nixos-options

And make it nix-mode's lookup-documentation handler, so pressing `K` on
an option will prefill the ivy search.
This commit is contained in:
Henrik Lissner 2019-09-21 13:54:30 -04:00
parent 615e632477
commit 6f9b7a2889
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 44 additions and 2 deletions

View file

@ -4,6 +4,8 @@
:mode "\\.nix\\'"
:config
(set-company-backend! 'nix-mode 'company-nixos-options)
(set-lookup-handlers! 'nix-mode
:documentation '(+nix/lookup-option :async t))
(map! :localleader
:map nix-mode-map
@ -13,8 +15,7 @@
"s" #'nix-shell
"b" #'nix-build
"u" #'nix-unpack
(:when (featurep! :completion helm)
"o" #'helm-nixos-options)))
"o" #'+nix/lookup-option))
(use-package! nix-drv-mode
:mode "\\.drv\\'")