tools/editorconfig: detect elisp & js shell scripts

(And sort +editorconfig-mode-alist alphabetically)
This commit is contained in:
Henrik Lissner 2019-10-20 18:55:48 -04:00
parent 1694641636
commit 6fab07a2e7
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -5,12 +5,14 @@
;; major mode to drop editorconfig a hint? This is accomplished by temporarily
;; appending an extension to `buffer-file-name' when we talk to editorconfig.
(defvar +editorconfig-mode-alist
'((sh-mode . "sh")
'((emacs-lisp-mode . "el")
(enh-ruby-mode . "rb")
(js2-mode . "js")
(perl-mode . "pl")
(php-mode . "php")
(python-mode . "py")
(ruby-mode . "rb")
(enh-ruby-mode . "rb")
(perl-mode . "pl")
(php-mode . "php"))
(sh-mode . "sh"))
"An alist mapping major modes to extensions. Used by
`doom--editorconfig-smart-detection-a' to give editorconfig filetype hints.")