Fix tabs in nix files
This commit is contained in:
parent
b05bcb1473
commit
e80b231881
12
init.el
12
init.el
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue