Skip to content
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

Add option to disable "Go to symbol in workspace" #2236

Closed
stefanhaller opened this issue Jan 8, 2022 · 8 comments
Closed

Add option to disable "Go to symbol in workspace" #2236

stefanhaller opened this issue Jan 8, 2022 · 8 comments
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@stefanhaller
Copy link

"Go to symbol in workspace" is often very slow, and there are several issues about that (e.g. this one). In a python-only workspace this wouldn't be a big deal, as people just don't use the command if it doesn't work well for them.

However, it becomes a big problem in multi-language workspaces. I'm working mostly with C++, and the clangd language server comes up with results for "Go to symbol in workspace" almost instantly. Still, the command is unusable for C++ symbol lookup as long as the python language server is enabled, because the command waits for results from all language servers before it shows them.

There's a vscode issue about that (microsoft/vscode#140298), but it may be hard to implement, so as long as we don't have that, it would be very useful to disable the "Go to symbol in workspace" function of the python language server (so that I don't have to disable the language server altogether, which is my current workaround).

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Jan 10, 2022
@judej judej added the enhancement New feature or request label Jan 10, 2022
@judej
Copy link
Contributor

judej commented Jan 10, 2022

This will be solved with streaming of "Go to Symbol" is supported by VS code. Pylance already supports streamed results.

@stefanhaller
Copy link
Author

This will be solved with streaming of "Go to Symbol" is supported by VS code. Pylance already supports streamed results.

OK, but as far as I can see, streaming is tricky to do for a number of UX reasons, and the likelihood of it being implemented soon seems low.

Adding an option to disable "Go to Symbol" for python seems like a low-effort solution to the problem, which, as far as I can see, has no other workarounds right now (short of disabling the python language server altogether).

Would you consider adding this option temporarily as long as we don't have streaming? It could be removed again once we do.

@heejaechang heejaechang added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Jan 25, 2022
@heejaechang
Copy link
Contributor

added hidden option is "python.analysis.disableWorkspaceSymbol"

put it in settings.json to turn off workspace symbol for python. it is hidden option so vscode won't recognize it but Pylance should still pick it up if it is in settings.json.

@stefanhaller
Copy link
Author

Thanks! Is this supposed to work with the current insiders build though? I turned on the insiders option for both the python extension and the pylance extension, but it doesn't work for me.

@heejaechang
Copy link
Contributor

it is not released yet. it will be in 2022.1.4 version

@stefanhaller
Copy link
Author

I know it's not released yet, my question was about the insiders version. My understanding was that that's a daily build that can be used to test non-released features before they are publicly released.

Is the pylance insiders build not actually a daily build? It says v2022.1.4-pre.1 for me right now.

@stefanhaller
Copy link
Author

OK, I can confirm that the option works in v2022.1.5 and (v2022.1.6-pre.1). Thanks again!

@debonte
Copy link
Contributor

debonte commented Feb 4, 2022

This issue was fixed in version 2022.1.5. You can find the changelog here: CHANGELOG.md

@debonte debonte closed this as completed Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

4 participants