Ruby
Table of Contents
1 Interface
1.1 Completion
(use-package company-inf-ruby)
2 Tools
2.1 Bundler
(use-package bundler
:load-path "~/projects/emacs/bundler.el")
2.2 Rspec
(use-package rspec-mode)
2.3 Yari
(use-package yari)
2.3.1 Making it work
Get the base ruby documentation here
gem install rdoc-data
rdoc-data --install
This gets all the rdoc for your installed gems
gem rdoc --all --ri
3 Mode
3.1 Ruby Block mode
This is gone?!?
(use-package ruby-block
:diminish "[R] "
:ensure t
:init
(setq ruby-block-highlight-toggle t)
:config)
3.2 Rinari
Rinari Is Not A Rails Ide. ESPRYGAA! (Emagicians Starter Pack Rejects Your Goofy Acronym Assertion!)
(use-package rinari
:ensure t
:diminish "🚅 ")
3.3 Robe
(use-package robe
:ensure t)
3.4 Mode setup
Thanks to the emacs starter kit classic for the list of ode files list. https://github.com/technomancy/emacs-starter-kit/blob/v2/modules/starter-kit-ruby.el
(use-package ruby-mode
:interpreter "ruby"
:mode
(("\\.rake$" . ruby-mode)
("\\.task$" . ruby-mode)
("\\.thor$" . ruby-mode)
("\\.gemspec$" . ruby-mode)
("\\.rb$" . ruby-mode)
("\\.ru$" . ruby-mode)
("Rakefile$" . ruby-mode)
("Thorfile$" . ruby-mode)
("Gemfile$" . ruby-mode)
("Capfile$" . ruby-mode)
("Vagrantfile$" . ruby-mode))
:init
(use-package ruby-tools)
(emagician/minor-in-major-mode ruby-tools-mode ruby-mode-hook))
4 Environment
4.1 Add RBEnv path disabled
This used to be required to make rbenv work, but not any more.
(emagician/add-to-path (concat (getenv "HOME") "/.rbenv/shims") t)