How to search python function definitions across all installed packages #3187
Replies: 6 comments 4 replies
-
|
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
-
|
Another use case where this is useful is, in case of function arguments which gets dependency injected on runtime. Different frameworks supports DI of function arguments for example Django, pylance language server will not be able to determine the type of these function variable, hence method resolutions will not work. |
Beta Was this translation helpful? Give feedback.
-
|
It will be good if Peek --> Peek Definition on any python function/method call, should provide the definitions across all the available python libraries, this will be useful if objects type is unkown particularly the once get injected during run time |
Beta Was this translation helpful? Give feedback.
-
|
This feature is mainly needed for python language, unlike c and javascript, python package dependencies can be present outside the workspace. @judej Let me know your comments |
Beta Was this translation helpful? Give feedback.
-
|
So what is the workaround? I tried symlinking the library from site-packages to the workspace, but still I cannot find the symbols |
Beta Was this translation helpful? Give feedback.
-
|
We've just submitted an implementation of this feature behind a new flag (coming in our next Prerelease).
Setting that flag to true will also search all of your 3rd party libraries for symbols (as well as files in the current workspace). It uses the python.analysis.packageIndexDepth to determine how deep to search. The default depth is only 1 for most things though, so if you want your specific library to be indexed, you might need to change the packageIndexDepth. It also only searches for public symbols |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to search for a function name across all installed packages and also in the packages defined by python.autoComplete.extraPaths setting.
Vscode search panel searches only in the current workspace. Whereas in pycharm IDE ctrl + click on a word is able to search across all packages.
Is there a way to search for function definition across all installed packages using vscode IDE?
Beta Was this translation helpful? Give feedback.
All reactions