Connect Nova to Solargraph language server. Solargraph provides intellisense, code completion, and inline documentation for Ruby.
Please be patient if you get into issues or limitations. We are still testing and improving the extension.
- Code completions
- Go to definition
- Diagnostics (RuboCop required)
- Format (RuboCop required)
- Format on save (RuboCop required)
- Documentation on hover
- Find references
- Workspace symbols
- Rename symbol
Start by installing the Ruby gem:
$ gem install solargraph
Then install the documentation for the current version of Ruby:
$ solargraph download-core
Finally generate the documentation for the installed gems:
$ yard gems
Follow this guide to configure Solargraph so it can pair well with Rails.
Consider installing this plugin too.
Alternatively, the extension can also launch Solargraph from the project bundle.
Start by adding the gem to the development group:
$ bundle add solargraph --group=development --require=false
Then check the Use Bundler
config in the extension or project settings.
Warning: If the
Use Bundler
config is checked but Solargraph is not in the bundle, the extension will raise an error.
Solargraph uses RuboCop to provide diagnostics and formatting. Make sure to install that gem too.
When RuboCop is installed you can opt-in for diagnostics and formatting from the extension or project settings.
Workspace symbols and find references results are going to be displayed in the Solargraph sidebar inside Nova.