These optional dotfiles indicate the root of a module or module group (:lang), and will later contain module metadata. They will also serve as an alternative to packages.el and doctor.el, and will aide the parts of the v3.0 module API concerned with resolving the current module from a path (`doom-module-from-path`), which currently rely too heavily on parsing path strings. For now, however, they're simply placeholders. |
||
---|---|---|
.. | ||
.doommodule | ||
autoload.el | ||
config.el | ||
doctor.el | ||
packages.el | ||
README.org |
:lang ruby
Description unfold
This module add Ruby and optional Ruby on Rails support to Emacs.
- Code completion (doom-package:robe)
- Syntax checking (doom-package:flycheck)
- Jump-to-definitions (doom-package:robe)
- Bundler
- Rubocop integration (doom-package:flycheck)
Maintainers
Module flags
- +chruby
- Enable chruby integration.
- +lsp
-
Enable LSP support for
ruby-mode
. Requires doom-module::tools lsp and a langserver (supports solargraph). - +rails
- Enable rails navigational commands, plus server+console integration.
- +rbenv
- Enable rbenv integration.
- +rvm
- Enable RVM (Ruby Version Manager) integration.
- +tree-sitter
- Leverages tree-sitter for better syntax highlighting and structural text editing. Requires doom-module::tools tree-sitter.
Packages
- doom-package:bundler
- doom-package:chruby if doom-module:+chruby
- doom-package:company-inf-ruby if :completion company
- doom-package:inf-ruby
- doom-package:minitest
- doom-package:rake
- doom-package:rbenv if doom-module:+rbenv
- doom-package:robe
- doom-package:rspec-mode
- doom-package:rubocop
- doom-package:rvm if doom-module:+rvm
Hacks
No hacks documented for this module.
TODO Changelog
This module does not have a changelog yet.
Installation
Enable this module in your doom!
block.
This module requires Ruby and the Rubocop gem. It is recommended you install both with some version manager (RVM or Rbenv).
These guides will help you install Ruby:
Then run $ gem install rubocop
to install rubocop.
Formatter
Formatting is handled using the doom-module::editor format module via prettier.
TODO Usage
This module's usage documentation is incomplete. Complete it?
Commands
robe
command | key / ex command | description |
---|---|---|
robe-start |
<localleader> ' | Open ruby lang server for auto-completions and jump to definitions |
robe-rails-refresh |
<localleader> R | Refresh the lang server. |
projectile-rails
The projectile-rails prefix is <localleader> r:
command | key / ex command | description |
---|---|---|
projectile-rails-console |
<localleader> r r | Open Rails console |
projectile-rails-server |
<localleader> r R | Open Rails server |
projectile-rails-find-model |
<localleader> r m | Find any model of the project |
projectile-rails-find-model |
<localleader> r M | Find the model related of currently open resource |
bundler
The bundler prefix is <localleader> b:
command | key / ex command | description |
---|---|---|
bundle-install |
<localleader> b i | Runs bundle install |
bundle-update |
<localleader> b u | Runs bundle update |
rspec-mode
The rspec-mode prefix is <localleader> t:
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 |
TODO Configuration
This module has no configuration documentation yet. Write some?
Troubleshooting
There are no known problems with this module. Report one?
Known imenu issues
These are recorded issues with ruby-mode's imenu integration that need to be addressed upstream. PRs to fix them locally are welcome.
-
Incorrectly parses methods/items after an array accessor endless method definition (Ruby 3+):
class Foo def bar; end def baz; end def [](key) = x + x def wop; end def gop; end end
Imenu will list
Foo#bar
,Foo#baz
, andFoo#[]
but stops there, sometimes listing the rest as if there were top-level. -
Does not recognize inline Struct definitions as classes:
Foo = Struct.new(:a, :b, :c) do def test; end end
Imenu should recognize this method as
Foo#test
, nottest
.class Foo < Struct.new(...)
is not an acceptable workaround because it creates an intermediary class (i.e. has side-effects).
Frequently asked questions
This module has no FAQs yet. Ask one?
TODO Appendix
This module has no appendix yet. Write one?