From 1b172e9f43ff7d4ab8629af8cf214878d2da967b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 8 Sep 2018 18:22:41 -0400 Subject: [PATCH] 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). --- core/autoload/help.el | 1 + modules/tools/editorconfig/config.el | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 6f2d4d8d0..c30be5e94 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -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) diff --git a/modules/tools/editorconfig/config.el b/modules/tools/editorconfig/config.el index 99c6f2ec0..33b99b936 100644 --- a/modules/tools/editorconfig/config.el +++ b/modules/tools/editorconfig/config.el @@ -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.")