goto-declaration to go to import instead of definition
Congrats on the Beta release!
This is a feature that existed forever in jedi since before LSPs existed and it's something that I've been missing (A LOT tbh) since moving on with (based)pyright which don't implement this LSP feature at all (iirc).
Basically, if I call goto-declaration (not goto-definition) on an imported class/object/etc, it would jump to the import statement in the same file instead of the source definition.
Pyrefly already added this feature after I mentioned it on HN, which was cool. Would be great to also have it in Ty if possible (it already works in Zuban, which is the successor of Jedi).
TypeScript does a slightly different distinction (at least in their non LSP based extension) but I liked having the option to jump to both.
I think what's important is that clicking go to declaration on the imported name should still resolve to the declaration in the other file.
From memory, I believe pyright doesn't implement textDocument/declaration at all (I just used to get an error that it's not provided by the lsp). The behavior as it is in zuban/pyrefly right now is to behave like textDocument/definition for anything within the same file (just jumps to where a variable/class is declared) but if it's in a different file, it would jump to the import line which is very useful to check from were a class/function/constant is being imported.