Provide a way to search for symbols in libraries #2679
Replies: 8 comments
-
Copy of my comment: The LSP spec has Searching libraries might need an LSP change to make it more clear that this is done (or we optionally do it anyway with some toggle). Note that we are still restricted by the LSP and what the VS Code UI allows, they still call it "symbol in workspace". |
Beta Was this translation helpful? Give feedback.
-
From the pyright 1.1.63 release notes:
|
Beta Was this translation helpful? Give feedback.
-
Is there any way or API to request the language server search the entire library beyond the workspace? Or should one make a textDocument/completion request instead? |
Beta Was this translation helpful? Give feedback.
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
-
I would find the feature very useful as well |
Beta Was this translation helpful? Give feedback.
-
Yeah, definitely I miss this functionality a lot. |
Beta Was this translation helpful? Give feedback.
-
Is there any known workaround? |
Beta Was this translation helpful? Give feedback.
-
Sorry, there's no known workaround. The code (at the moment) is purposefully only returning files in the workspace. Based on the number of upvotes for this discussion, it's likely we'll add something along these lines at some point though. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is the ONE PyCharm feature I'm missing a lot: Being able to quickly search for library symbols!
By default I just want my application symbols when pressing ^T, but I'd like to have a way to browse library symbols as well. In PyCharm this is done by pressing the same shortcut again (which toggles between workspace and libraries).
This feature incredibly useful when you want to view the code of some library function which you know exists, but is not currently being imported in my code (where you could ctrl-click it).
Since switching from PyCharm to VSCode I ended up viewing library code in GitHub countless times - and of course doing so is MUCH less pleasant than being able to just do it from within my editor. Even more so if I don't know which file contains the symbol I want to view...
(issue based on the off-topic comments in #34)
Beta Was this translation helpful? Give feedback.
All reactions