Nova

Extensions


Readme

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.

Features

  • 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

Setup

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 Bundler config 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.


Changelog

Version 1.4

Fix:

  • 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.

Version 1.3

Improved:

  • Remove bundlerbridge in favor of $SHELL -c command.
  • Support passing custom ENV to the LSP. This facilitates a temporary fix for using Chruby.

Version 1.2

Fixed:

  • Make bundlerbridge executable at the first startup since Nova doesn't allow to ship binaries.

Version 1.1

Fixed:

  • Testing new bundlerbridge binary

Version 1.0

Initial release