nix-mode
nix-mode copied to clipboard
nixpkgs-fmt as nix-indent-function
Are there any plans to make an indent function based on nixpkgs-fmt or at least one that agrees with nixpkgs-fmt?
You can easily just do what I do:
(customize-set-variable 'nix-nixfmt-bin "nixpkgs-fmt")
AFAICT, the only indentation-related change needed is to align expressions with in. I did this by adding the following to nix-mode-hook:
(smie-config-local '((0 :after "in" nil)))
Do we want to standardize on the nixpkgs-fmt style and use this as the default in nix-smie-rules? It would be a quick PR.