Git Product home page Git Product logo

solargraph's Introduction

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.

solargraph's People

Contributors

tommasongr avatar

Stargazers

Dan Charlesworth avatar Bijan Rahnema avatar  avatar Etienne van Delden de la Haije avatar Matthew Zagaja avatar

Watchers

Etienne van Delden de la Haije avatar

solargraph's Issues

Cannot start server using asdf

Using:
solargraph v0.48.0
nova-ruby/solargraph v1.4
Ruby 2.7.8p225
asdf v0.13.1
Nova 11.9

Here is my workspace configuration:

{
  "tommasonegri.solargraph.commandPath" : "\/Users\/ryan\/.asdf\/shims\/solargraph",
  "tommasonegri.solargraph.internals.server.error" : true,
  "tommasonegri.solargraph.logLevel" : "debug",
  "tommasonegri.solargraph.useBundler" : "false",
  "tommasonegri.solargraph.workspace.enabled" : true
}

Every time I try to start/restart the server, I get the following message:

Server stopped unexpectedly: The request was canceled

Screenshot 2024-03-28 at 11 41 50

I also occasionally get the error following error, after not changing any configuration:

Server stopped unexpectedly: Task exited with a non-zero exit status: 126

Screenshot 2024-03-28 at 11 50 27

I can't find any logs anywhere to try to get more helpful error messages

Error: Solargraph. Server stopped unexpectedly…

image
which solargraph >> /Users/gscar/.gem/ruby/**3.2.0**/bin/solargraph and went to Project Setting and
image
I get the same error when rebooting Nova.

➜ solargraph -v 0.48.0

macOS 13.2 using chruby.

Thank you for any suggestions. Not sure where to turn to for help with Nova

Request: Socket support

Some workflows have Solrgraph run in a container, exposed via socket.

Would be nice to have a workflow configuration specify stdio or socket. (and specify port number)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.