Skip to content

Latest commit

 

History

History
99 lines (86 loc) · 4.6 KB

README.org

File metadata and controls

99 lines (86 loc) · 4.6 KB

lang/ruby

Table of contents

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.

Packages

Hacks

  • projectile-rails-custom-server-command were changed to suppress extraneous output logged to console. This was done to prevent a memory leak where the underlying process would continue logging to an Emacs buffer, which would grow forever. You can change to default behaviour by setting this variable to nil.

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

commandkey / ex commanddescription
robe-startSPC m \'Open ruby lang server for auto-completions and jump to definitions
robe-rails-refreshSPC m RRefresh the lang server.

projectile-rails

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

commandkey / ex commanddescription
projectile-rails-consoleSPC m r rOpen Rails console
projectile-rails-serverSPC m r ROpen Rails server
projectile-rails-find-modelSPC m r mFind any model of the project
projectile-rails-find-modelSPC m r MFind the model related of currently open resource

bundler

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

commandkey / ex commanddescription
bundle-installSPC m b iRuns bundle install
bundle-updateSPC m b uRuns bundle update

rspec-mode

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

commandkey / ex commanddescription
rspec-verifySPC m t vRuns rspec on current file
rspec-verify-methodSPC m t sRuns rspec for the item on cursor