tools/editorconfig: refactor how we ignore lisp modes
This commit is contained in:
parent
f3fa1b0324
commit
fddef812ec
2 changed files with 3 additions and 4 deletions
|
@ -181,7 +181,8 @@ Respects `require-final-newline'."
|
||||||
(when (boundp 'evil-shift-width)
|
(when (boundp 'evil-shift-width)
|
||||||
(setq evil-shift-width width))
|
(setq evil-shift-width width))
|
||||||
(cond ((require 'editorconfig nil t)
|
(cond ((require 'editorconfig nil t)
|
||||||
(editorconfig-set-indentation nil width))
|
(let (editorconfig-lisp-use-default-indent)
|
||||||
|
(editorconfig-set-indentation nil width)))
|
||||||
((require 'dtrt-indent nil t)
|
((require 'dtrt-indent nil t)
|
||||||
(when-let (var (nth 2 (assq major-mode dtrt-indent-hook-mapping-list)))
|
(when-let (var (nth 2 (assq major-mode dtrt-indent-hook-mapping-list)))
|
||||||
(doom-log "Updated %s = %d" var width)
|
(doom-log "Updated %s = %d" var width)
|
||||||
|
|
|
@ -52,9 +52,7 @@ specified by editorconfig."
|
||||||
;; Editorconfig makes indentation too rigid in Lisp modes, so tell
|
;; Editorconfig makes indentation too rigid in Lisp modes, so tell
|
||||||
;; editorconfig to ignore indentation there. The dynamic indentation support
|
;; editorconfig to ignore indentation there. The dynamic indentation support
|
||||||
;; built into Emacs is superior.
|
;; built into Emacs is superior.
|
||||||
(dolist (mode '(emacs-lisp-mode lisp-mode))
|
(setq editorconfig-lisp-use-default-indent t)
|
||||||
(delq (assq mode editorconfig-indentation-alist)
|
|
||||||
editorconfig-indentation-alist))
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
(editorconfig-mode +1))
|
(editorconfig-mode +1))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue