Remove :editorconfig setting
This commit is contained in:
parent
9d81bc5a8b
commit
f063a08891
3 changed files with 9 additions and 19 deletions
|
@ -171,17 +171,6 @@ with functions that require it (like modeline segments)."
|
|||
;; Handles whitespace (tabs/spaces) settings externally. This way projects can
|
||||
;; specify their own formatting rules.
|
||||
(def-package! editorconfig
|
||||
:init
|
||||
(def-setting! :editorconfig (action value)
|
||||
":add or :remove an entry in `editorconfig-indentation-alist'."
|
||||
(cond ((eq action :add)
|
||||
`(push ,value editorconfig-indentation-alist))
|
||||
((eq action :remove)
|
||||
`(setq editorconfig-indentation-alist
|
||||
(assq-delete-all ,value editorconfig-indentation-alist)))
|
||||
(t (error "%s is an invalid action for :editorconfig"
|
||||
action))))
|
||||
|
||||
:config
|
||||
(add-hook 'doom-init-hook #'editorconfig-mode)
|
||||
|
||||
|
@ -211,10 +200,12 @@ extension, try to guess one."
|
|||
(apply orig-fn args)))
|
||||
(advice-add #'editorconfig-call-editorconfig-exec :around #'doom*editorconfig-smart-detection)
|
||||
|
||||
;; Editorconfig makes indentation weird in Lisp modes, so we disable it. It
|
||||
;; still applies other project settings (e.g. tabs vs spaces) though.
|
||||
(set! :editorconfig :remove 'emacs-lisp-mode)
|
||||
(set! :editorconfig :remove 'lisp-mode)
|
||||
;; Editorconfig makes indentation too rigid in Lisp modes, so tell
|
||||
;; editorconfig to ignore indentation. I prefer dynamic indentation support
|
||||
;; built into Emacs.
|
||||
(dolist (mode '(emacs-lisp-mode lisp-mode))
|
||||
(setq editorconfig-indentation-alist
|
||||
(assq-delete-all mode editorconfig-indentation-alist)))
|
||||
|
||||
(defvar whitespace-style)
|
||||
(defun doom|editorconfig-whitespace-mode-maybe (&rest _)
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
(set! :electric 'js2-mode :chars '(?\} ?\) ?.))
|
||||
(set! :jump 'js2-mode :xref-backend #'xref-js2-xref-backend)
|
||||
|
||||
;; Conform switch-case indentation to editorconfig's config
|
||||
(set! :editorconfig :add '(js2-mode js2-basic-offset js-switch-indent-offset))
|
||||
;; Conform switch-case indentation to js2 normal indent
|
||||
(defvaralias 'js-switch-indent-offset 'js2-basic-offset)
|
||||
|
||||
(sp-with-modes '(js2-mode rjsx-mode)
|
||||
(sp-local-pair "/* " " */" :post-handlers '(("| " "SPC"))))
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
|
||||
(def-package! moonscript
|
||||
:mode ("\\.moon$" . moonscript-mode)
|
||||
:config
|
||||
(set! :editorconfig :add '(moonscript-mode moonscript-indent-offset)))
|
||||
:config (defvaralias 'moonscript-indent-offset 'tab-width))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue