A Ruby LSP addon for the Hanami framework.
Ruby LSP must be installed.
❗ This project is still in active development, and as such, the gem does not yet exist. If installing, please build from source ❗
Install the Gem:
gem install ruby-lsp-hanami
or
bundle add ruby-lsp-hanami --group development
Currently, VS Code offers the most feature complete experience, and is the our primary development target. There are plans to bring other editors to feature parity, and this README will be updated accordingly.
To enable auto-complete suggestions per keystroke in VS Code, as well as enabling Hanami specific diagnostics (like 'Key Not Found' behavior), update your settings.json with the following values:
{
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
},
"editor.suggestOnTriggerCharacters": true,
"rubyLsp.formatter": "hanami_diagnostics"
}
Zed uses solargraph by default, update your settings to use ruby-lsp:
"languages": {
"Ruby": {
"language_servers": ["ruby-lsp"]
}
},
"lsp": {
"ruby-lsp": {
"initialization_options": {
"formatter": "hanami_diagnostics",
}
}
}
You can read more about configuring Ruby LSP support for Zed here.
- 'Go-to-definition' support for
Depsdependencies. - Autocompletion of
Depsdependencies. - 'Key not found' diagnostics for
Depsdependencies. - 'CodeLens' capabilities ('Jump to [Template|View|Route]' from within your
Hanami::Action).
- Fork it (https://github.com/hanami/ruby-lsp-hanami/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
In addition to contributing code, you can help to triage issues. This can include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to subscribe to hanami on CodeTriage.