James Spencer
b4682969e9
Signed-off-by: James Spencer <james@jmes.tech> |
||
---|---|---|
.rubocop.yml | ||
.solargraph.yml | ||
Gemfile | ||
README.md | ||
Rakefile |
README.md
Ruby Starter
A super simple Ruby starter project.
Rubocop and Solargraph are included for linting and code completion, respectively and are configured to be used with Zed.
Prerequisites
Setup
- Clone this repository
- Install dependencies:
bundle install
- Write awesome code
Usage with Zed
Zed is a rough-around-the-edges editor in Beta. It's not very configurable yet,
so we're locked into using Solargraph as our language server. Solargraph is
only officially compatible with Rubocop (ACAB) for linting, but we use our ruleset of choice, [StandardRB] by configuring it in .rubocop.yml
.
For now, make sure that StandardRB is installed globally, as Zed can't yet reach into your local Gem's, as far as we are aware.
Solargraph is configured in .solargraph.yml
to use robocop, but to enable
inline diagnostics and formatting on save you must add the following to your Zed
settings.json
:
{
"lsp": {
"solargraph": {
"initialization_options": {
"diagnostics": true,
"formatting": true,
}
}
}
}
Documentation
If you'd like to generate some user-friendly documentation, you can run
rake
on the command line to generate some HTML docs in the rdoc
directory, made up of your comments and some metadata from your code.