You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using "Go to definition" for a common named method like "call" vscode open box that shows unrelated classes with this method.
For example:
ModuleA::SubModuleA::ClassNameA.new.call()
Also "Go to definition" the new method is returning non-relevant list.
Using the Ruby Solargraph seems to work well with the link jumps.
Did I configured the extension wrong?
I dont see any special configuration except the version manager
The text was updated successfully, but these errors were encountered:
First, your Ruby LSP server version is quite outdated (v0.17.2 when we're already on v0.22.1). I recommend updating it and if you have any trouble, see the outdated version docs.
I created a PR to add inference for methods invoked directly on an object instantiation #3007, which is something we wanted to add, but hadn't done before.
However, I do want to point out that accuracy in editor functionality is tightly coupled with the adoption of a type system and corresponding type checker. The Ruby LSP doesn't require you to adopt any type systems, so when types cannot be determined we fall back to simpler behaviour, like listing all possible options. I say this because #3007 will solve the exact scenario you mentioned, but it will not guarantee accuracy in every situation - and that is not possible without a type system.
Description
Ruby LSP Information
Ruby LSP Information
VS Code Version
1.96.1
Ruby LSP Extension Version
0.8.16
Ruby LSP Server Version
0.17.2
Ruby LSP Addons
Ruby Version
3.2.2
Ruby Version Manager
rbenv
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
User
Reproduction steps
When using "Go to definition" for a common named method like "call" vscode open box that shows unrelated classes with this method.
For example:
ModuleA::SubModuleA::ClassNameA.new.call()
Also "Go to definition" the new method is returning non-relevant list.
Using the Ruby Solargraph seems to work well with the link jumps.
Did I configured the extension wrong?
I dont see any special configuration except the version manager
The text was updated successfully, but these errors were encountered: