-
Notifications
You must be signed in to change notification settings - Fork 217
Description
I have checked that this feature is not already implemented
- This feature does not exist
Use case
Currently, developers working on ruby-lsp server itself cannot easily run their local changes in standalone mode. When debugging the extension in a target workspace without a Gemfile, the extension loads the installed gem instead of the local development copy. It will switch to the local copy but only when working within ruby-lsp itself (which has a Gemfile). This forces developers to either create custom Gemfiles (which changes the server mode) or use workarounds like symlinks.
Description
Add a configuration setting that allows developers to specify a local file path to the ruby-lsp server executable. The main goal would be to use this setting in standalone mode, though it may make sense to apply this to the normal mode as well. This would keep things consistent and simplify setting up a local server in normal mode.
Implementation
Add a new rubyLsp.serverPath setting that accepts a file path to a local ruby-lsp executable. Modify the getLspExecutables method to check this setting first, and if set, use the specified path instead of resolving to the installed gem. Ensure this setting cannot be used simultaneously with rubyLsp.branch to prevent conflicts. The setting should be validated to ensure the path exists and points to a valid executable or ruby-lsp repo.
See #3690 for the initial discussion.