-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Define: Go to definition, declaration, implementation, type definition #2541
Comments
Thinking out loud... For a file module:
For a variable, const or static:
For a trait method (call or implementation):
For an inherent method (call):
|
Same as implementation. You can unambigiously go from that to declaration, but not in the opposite direction. IntelliJ Rust recently implemented a crazily neat feature where, when to you go to def for a method, it remembers the substitution, and subsequent goto defs take these substitutions into account. Ie, goto def |
I'm using VS Code. I'm not sure if this is the right issue to ask. I expected go to definition (F12) to go to the
|
We don't have a way to find the trait implementation yet. There's e.g. #4558 for this, and it's mostly why this issue is still open as well. |
The LSP (as of 3.15) supports go to definition, declaration, implementation and type definition.
What do these mean in a rust world? Does supporting all of the above features make sense? We should define what each of the above operations mean and figure out what makes sense for rust.
Context: #2538 (comment)
The text was updated successfully, but these errors were encountered: