- Advanced Ruby LSP
- A configurable Ruby LSP integration, with all settings also customisable at a project level
- 4 Installs
-
This extension is allowed to:
- Read Files
- Launch Subprocesses
Readme
The Advanced Ruby LSP extension integrates with the ruby-lsp
gem, with advanced configuration options to manage PATHs and bundler invocation, as well as the ability to auto-format Ruby documents when they're saved.
Requirements
You will need the ruby-lsp
gem installed on your machine, and the appropriate path (or paths) configured.
Configuration
There are three settings available to configure, which can all be managed both at a global level, and at a project/workspace level.
- Run the Ruby LSP either directly or via bundler.
- Set additional PATH directories to reliably detect the
ruby-lsp
executable. - Auto-formatting of Ruby files when they're saved.
To configure global preferences, open Extensions → Extension Library... then select Advanced Ruby LSP's Preferences tab.
You can also configure preferences on a per-project basis in Project → Project Settings...
Currently on my own machine, I am using mise
to manage Ruby versions, so I have the following path added to the extension settings:
/Users/[username]/.local/share/mise/shims
I also have the ruby-lsp
gem in each project's Gemfile, so I can use Bundler as part of the boot process.
Usage
Ideally, the LSP should just run in the background and provide help where it can (to the best of Nova's abilities). Sometimes it can crash, though - so there is a command to restart the LSP via the command palette: Restart Ruby LSP
Credits
I have learned a great deal from the code of other Ruby LSP extensions:
- https://github.com/edwardloveall/ruby-lsp.novaextension for the format-on-save functionality
- https://github.com/Roguelazer/ruby-lsp.novaextension/ for using the ruby-lsp gem
- https://github.com/tdegrunt/ruby.novaextension for general Ruby LSP integration
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/pat/advanced-ruby-lsp.novaextension. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
License
The extension is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in this extension's codebase, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Changelog
Version 0.1.0
Initial release
License
The MIT License (MIT)
Copyright (c) 2025 Pat Allan
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.