Fix #3555: jinja2-mode reindenting on save

This commit is contained in:
Henrik Lissner 2020-07-16 17:38:43 -04:00
parent 2cedf150ec
commit 576eb40b50
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -17,7 +17,13 @@
(set-evil-initial-state! '(ansible-doc-module-mode) 'emacs)) (set-evil-initial-state! '(ansible-doc-module-mode) 'emacs))
(use-package! jinja2-mode (use-package! jinja2-mode
:mode "\\.j2$") :mode "\\.j2$"
:config
;; The default behavior is to reindent the whole buffer on save. This is
;; disruptive and imposing. There are indentation commands available; the user
;; can decide when they want their code reindented.
(add-hook! 'jinja2-mode-hook
(remove-hook 'after-save-hook 'jinja2-indent-buffer t)))
(def-project-mode! +ansible-yaml-mode (def-project-mode! +ansible-yaml-mode
:modes '(yaml-mode) :modes '(yaml-mode)