nixos-options | helm-nixos-options | company-nixos-options |
The function helm-nixos-options
is the one that you want to bind. You are free
to choose where and if you want it global you can have this.
(global-set-key (kbd "C-c C-S-n") 'helm-nixos-options)
The description of the option is shown in the minibuffer
If you want more information, there is a detailed buffer when you press return
There are also other actions like inserting the current match into the buffer
Add company-nixos-options to allowed company-mode backends list
(add-to-list 'company-backends 'company-nixos-options)
For now it shows the documentation of the option in a popup-buffer.
Contains utility functions to work with nix-shell
sandboxes.
nix-shell-command
to compose anix-shell
command string that can be passed to the command-linenix-shell
that directly executes a command in the given sandboxnix-find-sandbox
searches from the given path upwards until it finds a*.nix
file.nix-current-sandbox
searches from the current working directroy upwards until it finds a*.nix
filenix-executable-find
, a replacement for the built-inexecutable-find
. It searches in the given sandbox for executable.
With these utility functions, flycheck can easily be used with Nix:
(setq flycheck-command-wrapper-function
(lambda (command) (apply 'nix-shell-command (nix-current-sandbox) command))
flycheck-executable-find
(lambda (cmd) (nix-executable-find (nix-current-sandbox) cmd)))
To use haskell-mode together with Nix, add these lines to your configuration:
(setq haskell-process-wrapper-function
(lambda (args) (apply 'nix-shell-command (nix-current-sandbox) args)))