doomemacs/modules/lang/ruby
2021-02-26 21:34:09 -05:00
..
autoload.el Remove references to enh-ruby-mode 2020-03-12 11:29:54 -04:00
config.el remove custom server command 2020-11-12 22:05:39 -03:00
doctor.el lang/ruby: add +chruby (#2667) 2020-03-09 14:04:10 -04:00
packages.el Bump :lang 2021-02-25 10:46:46 -05:00
README.org Merge pull request #4261 from otavioschwanck/fix-rails-command 2021-02-26 21:34:09 -05:00

lang/ruby

Description

This module add Ruby and optional Ruby on Rails support to Emacs.

  • Code completion (robe)
  • Syntax checking (flycheck)
  • Jump-to-definitions (robe)
  • Bundler
  • Rubocop integration (flycheck)

Module Flags

  • +lsp Enables LangServer support for ruby. You must have :tools lsp enabled for this to work, as well as the langserver (solargraph) installed on your system.
  • +rvm Enables RVM (Ruby Version Manager) integration.
  • +rbenv Enables rbenv integration.
  • +chruby Enables chruby integration.
  • +rails Enables rails navigational commands, plus server+console integration.

Prerequisites

Many of this modules plugins require ruby with some version manager (RVM or Rbenv) and the rubocop gem.

Ubuntu

You can follow this guide. After ruby installation, run gem install rubocop.

MacOS

You can follow this guide. After ruby installation, run gem install rubocop.

Windows

You can follow this guide. After ruby installation, run gem install rubocop.

Appendix

Commands

robe

command key / ex command description
robe-start SPC m \' Open ruby lang server for auto-completions and jump to definitions
robe-rails-refresh SPC m R Refresh the lang server.

projectile-rails

The projectile-rails prefix is SPC m r. Here is some examples:

command key / ex command description
projectile-rails-console SPC m r r Open Rails console
projectile-rails-server SPC m r R Open Rails server
projectile-rails-find-model SPC m r m Find any model of the project
projectile-rails-find-model SPC m r M Find the model related of currently open resource

bundler

The bundler prefix is SPC m b. Here is some examples:

command key / ex command description
bundle-install SPC m b i Runs bundle install
bundle-update SPC m b u Runs bundle update

rspec-mode

The rspec-mode prefix is SPC m t. Here is some examples:

command key / ex command description
rspec-verify SPC m t v Runs rspec on current file
rspec-verify-method SPC m t s Runs rspec for the item on cursor