From 3248b2813bd30509bf042fe5ee86c77ca571ab4a Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Wed, 26 Aug 2020 11:39:35 -0700 Subject: [PATCH] Some ruby emacs stufF --- dotfiles/emacs.d/init.el | 17 +++++++++++++++++ dotfiles/emacs.d/package.el | 9 +++++++++ 2 files changed, 26 insertions(+) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 1c871ff..f6ddbe3 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -272,6 +272,23 @@ There are two things you can do about this warning: ;; Python testing helpers (use-package python-pytest) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RUBY ;;;;;;;;;;;;;;;;;; +;; +;; +;; + +(require 'rvm) + +(add-hook 'ruby-mode-hook 'robe-mode) + +(eval-after-load 'company + '(push 'company-robe company-backends)) + +(add-hook 'robe-mode-hook 'ac-robe-setup) + +(advice-add 'inf-ruby-console-auto :before #'rvm-activate-corresponding-ruby) + ;;-------------------------------------------------------------------------------------- ;; Save hooks ;;-------------------------------------------------------------------------------------- diff --git a/dotfiles/emacs.d/package.el b/dotfiles/emacs.d/package.el index 44ea251..c6f0999 100644 --- a/dotfiles/emacs.d/package.el +++ b/dotfiles/emacs.d/package.el @@ -45,6 +45,15 @@ elpy yaml-mode slime + + ;; Rails + rinari + + ;; Ruby autocomplete + robe + + ;; RVM support + rvm ;;;;;;;;;;;;;;;;;;;; ;; Test helpers