Better enh-ruby-mode suport in doom/describe-module & editorconfig

+ Associates enh-ruby-mode with :lang ruby for doom/describe-module
+ Enables editorconfig to detect extension-less or file-less ruby
  files (from shebang lines or file local variables).
This commit is contained in:
Henrik Lissner 2018-09-08 18:22:41 -04:00
parent 22a94fc41a
commit 1b172e9f43
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 7 additions and 5 deletions

View file

@ -28,6 +28,7 @@
(python-mode :lang python)
(restclient-mode :lang rest)
(ruby-mode :lang ruby)
(enh-ruby-mode :lang ruby)
(rust-mode :lang rust)
(scala-mode :lang scala)
(sh-mode :lang sh)

View file

@ -5,11 +5,12 @@
;; 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")
(python-mode . "py")
(ruby-mode . "rb")
(perl-mode . "pl")
(php-mode . "php"))
'((sh-mode . "sh")
(python-mode . "py")
(ruby-mode . "rb")
(enh-ruby-mode . "rb")
(perl-mode . "pl")
(php-mode . "php"))
"An alist mapping major modes to extensions. Used by
`doom*editorconfig-smart-detection' to give editorconfig filetype hints.")