How to customize 'Go To Definition' behavior #3595
Unanswered
c3-WesleyPickering
asked this question in
Q&A
Replies: 1 comment
-
I think this would require changes to the import resolver: It only looks for py and pyi files for supported files. And that would only work if your '.ext' files were valid python syntax. You could also provide your own python language server that supports goto definition only. VS code would combine your results with ours. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a unique use case where we can define a Python class in a non .py file and have the functions for the class be implemented in a .py file with the same name as that class.
Ex.
Racecar.ext
define a class and function signatures and Racecar.py has the implementation for those functions.To use Pylance's IntellSense functionalities, we have a folder of pyi files for all the classes in the stubs folder of the extension, and an
__init__.pyi
file to declare the class imports. This provides us with autocomplete.We are also looking to customize the behavior of
Go To Definition
so that:Beta Was this translation helpful? Give feedback.
All reactions