-
Notifications
You must be signed in to change notification settings - Fork 133
Go to definition behavior change request #1138
Comments
The LSP spec has both definition and declaration as of 3.14.0; perhaps we should implement both and have definition recurse until it hits the true assignment. |
this should be a bug, not the intended behaviour. Going by the name And even if it is intended behaviour (then it should be called something else, IMO), it is not consistent, like in below situations
def a_simple_function():
pass
from vscode_test import constants
from vscode_test.constants import a_simple_function
constants.a_simple_function()
a_simple_function()
|
Sure. 'Bug' is when something intended to work certain way, but it doesn't. If something is implemented certain way intentionally, with the appropriate test, and it works as designed, it is not technically a bug. Sure, it could be a wrong choice though :-) |
@MikhailArkhipov I don't know about language server implementation, but you also may to look at below issues together as it appears to me to originate from same design (if I am wrong, excuse me for making false noise)
|
Currently, using "Go to definition" with the MS Language Server will jump you to your import statement, likely at the top of your file, rather than jumping you into the class. I understand from a separate issue #850 that this is the intended behavior. Below is a gif of it.
In my view, "Go to definition" means that you go to where the class is defined. Taking me to the top of the file and showing me the import statement doesn't seem nearly as widely used or necessary as jumping directly to where the class is implemented.
Imagine you were in the full version of Visual Studio coding in C#, "Go to definition" would take you to the definition of your class.
If we insist that we need a separate feature to navigate us to the import statement, it seems that we should make a separate button and keyboard shortcut called "Go to declaration", and leave the "Go to definition" function to be the same behavior as Jedi.
The text was updated successfully, but these errors were encountered: