DFE-Digital / rails-template

Rails 7 template with GOV.UK Frontend
27 stars 5 forks source link

Add solargraph #10

Closed tvararu closed 2 years ago

tvararu commented 2 years ago

See also:

solargraph is a Ruby language server protocol; it provides intellisense capabilities to compatible editors.

solargraph can be used without adding a development dependency to a project, and it provides basic Ruby language completion for core language features. To set it up to work with our bespoke modules, gems, and Rails, you need to bundle it and run a command. I've documented this in the README.

The gem is require: falsed and is not bundled in the production build.

annotate and solargraph-rails are added for better Rails support.

Before After
Vim doesn't know what classes are under the ActiveModel::Type namespace Full class list and inline documentation
image image
String based autocompletion of instance methods Static analysis
image image