branch: elpa/nix-mode
commit 33b2edf8acfda775120cc66afabce0cf923f07eb
Author: Matthew Justin Bauer <[email protected]>
Commit: GitHub <[email protected]>
set spacing to defaults
This is recommended in the nixpkgs manual:
https://nixos.org/nixpkgs/manual/#sec-syntax
---
nix-mode.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/nix-mode.el b/nix-mode.el
index f432fd9463..88c2cebcbc 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -151,6 +151,11 @@ The hook `nix-mode-hook' is run when Nix mode is started.
"
(set-syntax-table nix-mode-syntax-table)
+ ;; Disable hard tabs and set tab to 2 spaces
+ ;; Recommended by nixpkgs manual:
https://nixos.org/nixpkgs/manual/#sec-syntax
+ (setq-local indent-tabs-mode t)
+ (setq-local tab-width 2)
+
;; Font lock support.
(setq-local font-lock-defaults '(nix-font-lock-keywords nil nil nil nil))