Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not sure what this warning it, but it is consistent #1508

Closed
resistorsoftware opened this issue Feb 3, 2023 · 8 comments
Closed

Not sure what this warning it, but it is consistent #1508

resistorsoftware opened this issue Feb 3, 2023 · 8 comments

Comments

@resistorsoftware
Copy link

I use Standard. In my bundles I added ruby-lsp. I have this VSCode ruby-lsp added to my VSCode.

I still get that little nag dialog about not having ruby-lsp in the bundle, and asking to bundle install it.

What is up with that? I get it, complex stuff. But it makes using this language server, suspect? Not sure it matters. But I am curious as to what causes this, and perhaps what the workaround is to get that to not happen.

@vinistock
Copy link
Member

Typically, if you have bundle installed already and the extension keeps showing you that it needs to bundle install it means that it is selecting the wrong version of Ruby.

Do you use any version managers (e.g.: chruby, asdf)? And if so, did you already configure the extension to use your preferred manager (docs)?

I should also mention that the Ruby LSP doesn't support Standard yet. So, you can get it to work, but the code can only be formatted with RuboCop or Syntax Tree at this time.

@resistorsoftware
Copy link
Author

I use RBEnv now, switched off RVM as it caused way too many problems with VSCode. I do use Standard, so I guess that for now, I cannot use the Ruby LSP.

@vinistock
Copy link
Member

Adding "rubyLsp.rubyVersionManager": "rbenv" to your VS Code configurations should select the correct version manager, which should make the bundle install dialogues go away.

While we don't yet support Standard as a formatter, you can still use the Ruby LSP with formatting disabled if you want. Just configure your enabled features to pick the ones you want.

"rubyLsp.enabledFeatures": {
  "formatting": false
  // keep everything else enabled
}

@resistorsoftware
Copy link
Author

Thank you! Will try all this out and see how it goes.

@resistorsoftware
Copy link
Author

I actually did have the correct setting, yet that prompt to install the bundle continues.. this is why I quit VSCode before, it just cannot handle the fact I have projects open that each have their own version of Ruby running... hence with it's global configuration it has all sorts of per project issues.

image

@vinistock
Copy link
Member

Do you have multiple projects open in the same instance of VS Code? If that's the case, indeed the Ruby LSP doesn't support that well yet.

@resistorsoftware
Copy link
Author

Absolutely! I see no reason not to work that way. But I do understand, VSCode is probably under-whelming for this use case. I keep hearing how RubyMine is actually the only editor that truly works at a pro-level... but I have never tried it with any gusto. Maybe I should!

@vinistock
Copy link
Member

There aren't any VS Code limitations as far as I know. The Ruby LSP just doesn't support multiple workspaces yet. I've opened #1510 to track the work to support it.

@vinistock vinistock closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
jayanth-kumar-morem referenced this issue in jayanth-kumar-morem/vscode-ruby-lsp Apr 26, 2023
…er-protocol-3.17.0.2

Bump language_server-protocol from 3.17.0.1 to 3.17.0.2
@vinistock vinistock transferred this issue from Shopify/vscode-ruby-lsp Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants