- A Ruby language server featuring code completion, intellisense, and inline documentation
- 194 Installs
This extension is allowed to:
- Read & Write Files
- Launch Subprocesses
Solargraph for Nova
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
Ruby on Rails setup
Follow this guide to configure Solargraph so it can pair well with Rails.
Consider installing this plugin too.
Launch from bundle
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 Bundlerconfig is checked but Solargraph is not in the bundle, the extension will raise an error.
Diagnostics & Formatting
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.
Find references & Workspace symbols
Workspace symbols and find references results are going to be displayed in the Solargraph sidebar inside Nova.
- Use willSave instead of didSave as the formatting on save handler. The previous one caused the document to be always in a not saved state.
- Remove bundlerbridge in favor of $SHELL -c command.
- Support passing custom ENV to the LSP. This facilitates a temporary fix for using Chruby.
- Make bundlerbridge executable at the first startup since Nova doesn't allow to ship binaries.
- Testing new bundlerbridge binary