Fix tabs in nix files

This commit is contained in:
outfoxxed 2023-01-13 13:46:45 -08:00
parent b05bcb1473
commit e80b231881
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

12
init.el
View file

@ -34,18 +34,14 @@
mouse-wheel-follow-mouse +1
scroll-step 1) ;; C-n C-p scroll step
;; Tabs
(setq custom-tab-width 2)
;; Highlight matching parens faster
(setq show-paren-delay 0)
(setq tab-width 2)
(defun disable-tabs ()
(indent-tabs-mode -1))
(defun enable-tabs ()
(local-set-key (kbd "TAB") 'tab-to-tab-stop)
(indent-tabs-mode +1)
(setq tab-width custom-tab-width))
(indent-tabs-mode +1))
(add-hook 'prog-mode-hook 'enable-tabs)
(add-hook 'lisp-mode-hook 'disable-tabs)
@ -147,7 +143,9 @@
;; Nix support
(use-package nix-mode
:mode "\\.nix\\'")
:mode "\\.nix\\'"
:config
(add-hook 'nix-mode-hook 'disable-tabs))
;; Treesitter based navigation
(use-package evil-textobj-tree-sitter