summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ruby-ts-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/ruby-ts-mode.el')
-rw-r--r--lisp/progmodes/ruby-ts-mode.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index 45174811605..d143c06a8a4 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -1047,6 +1047,20 @@ leading double colon is not added."
(treesit-major-mode-setup))
+(if (treesit-ready-p 'ruby)
+ ;; Copied from ruby-mode.el.
+ (add-to-list 'auto-mode-alist
+ (cons (concat "\\(?:\\.\\(?:"
+ "rbw?\\|ru\\|rake\\|thor"
+ "\\|jbuilder\\|rabl\\|gemspec\\|podspec"
+ "\\)"
+ "\\|/"
+ "\\(?:Gem\\|Rake\\|Cap\\|Thor"
+ "\\|Puppet\\|Berks\\|Brew"
+ "\\|Vagrant\\|Guard\\|Pod\\)file"
+ "\\)\\'")
+ 'ruby-ts-mode)))
+
(provide 'ruby-ts-mode)
;;; ruby-ts-mode.el ends here