mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
ruby-insert-encoding-magic-comment = nil
It is the default with enh-ruby-mode. Also: refactor ruby-mode config out of enh-ruby-mode.
This commit is contained in:
@ -7,15 +7,18 @@
|
|||||||
;;
|
;;
|
||||||
;;; Packages
|
;;; Packages
|
||||||
|
|
||||||
|
(after! ruby-mode
|
||||||
|
(setq ruby-insert-encoding-magic-comment nil)
|
||||||
|
(when (require 'enh-ruby-mode nil t)
|
||||||
|
(rassq-delete-all 'ruby-mode interpreter-mode-alist)))
|
||||||
|
|
||||||
|
|
||||||
(use-package! enh-ruby-mode
|
(use-package! enh-ruby-mode
|
||||||
:mode ("\\.\\(?:pry\\|irb\\)rc\\'" . +ruby-init-h)
|
:mode ("\\.\\(?:pry\\|irb\\)rc\\'" . +ruby-init-h)
|
||||||
:mode ("\\.\\(?:rb\\|rake\\|rabl\\|ru\\|builder\\|gemspec\\|jbuilder\\|thor\\)\\'" . +ruby-init-h)
|
:mode ("\\.\\(?:rb\\|rake\\|rabl\\|ru\\|builder\\|gemspec\\|jbuilder\\|thor\\)\\'" . +ruby-init-h)
|
||||||
:mode ("/\\(?:Berks\\|Cap\\|Gem\\|Guard\\|Pod\\|Puppet\\|Rake\\|Thor\\|Vagrant\\)file\\'" . +ruby-init-h)
|
:mode ("/\\(?:Berks\\|Cap\\|Gem\\|Guard\\|Pod\\|Puppet\\|Rake\\|Thor\\|Vagrant\\)file\\'" . +ruby-init-h)
|
||||||
:interpreter ("j?ruby\\([0-9.]+\\)" . +ruby-init-h)
|
:interpreter ("j?ruby\\([0-9.]+\\)" . +ruby-init-h)
|
||||||
:preface
|
:preface
|
||||||
(after! ruby-mode
|
|
||||||
(rassq-delete-all 'ruby-mode interpreter-mode-alist)
|
|
||||||
(require 'enh-ruby-mode))
|
|
||||||
(defun +ruby-init-h ()
|
(defun +ruby-init-h ()
|
||||||
"Enable `enh-ruby-mode' if ruby is available, otherwise `ruby-mode'."
|
"Enable `enh-ruby-mode' if ruby is available, otherwise `ruby-mode'."
|
||||||
(if (executable-find "ruby")
|
(if (executable-find "ruby")
|
||||||
|
Reference in New Issue
Block a user