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

Workspace Symbols don't work with pyright lsp #5382

Closed
smit2909 opened this issue Jan 3, 2023 · 1 comment
Closed

Workspace Symbols don't work with pyright lsp #5382

smit2909 opened this issue Jan 3, 2023 · 1 comment
Labels
C-bug Category: This is a bug

Comments

@smit2909
Copy link

smit2909 commented Jan 3, 2023

Summary

I am using pyright language server with below configuration, the workspace symbol picker does not show anything.

[[language]]
name = "python"
language-server = { command = "pyright-langserver", args = ["--stdio"] }
file-types = ["py", "pyi"]
config = { "analysis" = { "autoSearchPaths" = true, "diagnosticMode" = "workspace", "useLibraryCodeForTypes" = true } }
auto-format = true
formatter = { command = "black", args = ["-", "-q"] }

Reproduction Steps

Open any python project and a python file, in my case its a Django project and just open workspace symbol picker.

Log file shows below

2023-01-03T17:57:43.124 helix_term::application [ERROR] Language Server: Method not found client/registerCapability

Helix log

~/.cache/helix/helix.log
2023-01-03T17:57:43.124 helix_term::application [ERROR] Language Server: Method not found client/registerCapability

Platform

macOs

Terminal Emulator

westerm

Helix Version

22.12 (96ff64a)

@smit2909 smit2909 added the C-bug Category: This is a bug label Jan 3, 2023
@the-mikedavis
Copy link
Member

This was fixed in #5055 (merged after the 22.12 release, so you'll need to build from master to use it)

Pyright bails out and sends the empty list when the query is empty: https://github.com/microsoft/pyright/blob/d48b124719f37135d9aae17634ef8c1a2b75afed/packages/pyright-internal/src/analyzer/program.ts#L1659-L1663. #5055 sends new requests when you update the search in the workspace symbol picker so if you're running on master after #5055 was merged, you will still see an empty picker when you hit <space>S but then if you type a query into the picker you should see results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants