Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to search for symbols in libraries #35

Closed
ThiefMaster opened this issue Jul 2, 2020 · 4 comments
Closed

Provide a way to search for symbols in libraries #35

ThiefMaster opened this issue Jul 2, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@ThiefMaster
Copy link

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)

@jakebailey
Copy link
Member

Copy of my comment:

The LSP spec has workspace/symbol which traditionally only searches within the workspace/project: https://microsoft.github.io/language-server-protocol/specification#workspace_symbol

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".

@tekumara
Copy link

From the pyright 1.1.63 release notes:

Behavior Change: Changed "find workspace symbols" to return only symbols from within user code or opened files, not library files that are closed.

@wookayin
Copy link

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?

@judej
Copy link
Contributor

judej commented Apr 20, 2022

Moving this issue to discussion as an enhancement request for comments and upvotes.

@microsoft microsoft locked and limited conversation to collaborators Apr 20, 2022
@judej judej converted this issue into discussion #2679 Apr 20, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants