-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Issues with pyright-langserver #5958
Comments
Fixed on latest |
I updated to the latest commit (87518db1) and I still get the same error |
can confirm that, as of two days ago, this does not fix the problem. It's not a matter of the config being picked up because it's the same config telling helix to use pyright in the first place. |
Same for me. hx --version
hx languages.toml
hx --health python
pyright-langserver --stdio: |
Is there an example project that can be shared for this - maybe some existing open source project? I can't reproduce this behavior with the given configs running from the latest Helix build and pyright-langserver version 1.1.292 on standalone python files or in a project like flask. If you can reproduce this, can you post the log while running in verbose mode with a fresh log file ( |
@the-mikedavis here is a log https://pastebin.com/mXutGx7P New build from master: helix 22.12 (715c4b2) New directory, new file where I type in the following: import json
def func(a):
print(a)⏎ My config: [[language]]
name = "python"
roots = ["pyproject.toml", "setup.py", "Poetry.lock", "."]
language-server = { command = "pyright-langserver", args = ["--stdio"] }
auto-format = false
config = {} Let me know if you need anything else. |
That's perfect, thanks! I looked into this a little and I can reproduce the async timeouts. It looks like every request does not get a response from pyright at all. I've checked #5748 fixes this. It looks like we send |
I am glad #5748 fixes this, I am just not 100% sure right now why so I wanted to ask for some more details. Just to make sure we don't miss a second bug by accident. I don't understand why we are we ever sending
To me this would mean that helix should sent the CWD on master, because it can't find a root dir (which would be the new directory mentioned above and not Is there something else going on @the-mikedavis or is my understanding right that |
I tried out #5748 but it doesn't seem to resolve the issue for me... The log with that PR (note the reported hx version is the same in both, but this is misleading, this one is with that PR merged) is: Looks like for sure there some differences in the sent workspace folder etc. But still async job failed problems. Perhaps Mike was getting a different type of timeout? Note that my "roots" config has a "." entry in it I put in ages ago in an attempt to fall back on using current directory (e.g., writing a one off script not part of a package). I tried with and without the roots config commented out and no difference there either. |
This is probably not the cause of this bug but please don't do that :D It doesn't actually do what you want (the roots setting is used to look for directories that contain a FILE out of the list like
I suspect that the LS is not quite LSP conformant so something goes wrong during communication which eventually leads to the server locking up. I would need to debug this further tough and this might be false hints. |
I was always a bit suspect about it. At the time it made things work probably for the wrong reasons. However, I can confirm that this isn't the source of the problem outlined in this issue. |
Ah ok yeah that was unrelated: #5748 only fixes this for me when editing standalone files outside of a git directory when |
I see this behavior on pyright 1.1.293 and 1.1.294 (latest) but not 1.1.292. 1.1.292 works well... (log)
But 1.1.294 seems to get stuck... (log)
It looks like 1.1.293 started sending a helix/helix-term/src/application.rs Lines 960 to 967 in 31b0c75
Replying to that request with an error response fixes the hang for me. I'll open a PR. |
Summary
Using the pyright-langserver for my linter results in async timeout error whenever I do anything.
Reproduction Steps
Install the pyright langsever as described on the wiki page.
This is my global config.
Helix log
Not sure where the exact error was so I put everything.
~/.cache/helix/helix.log
Platform
Linux
Terminal Emulator
Alacritty
Helix Version
helix 22.12 (6929a12)
The text was updated successfully, but these errors were encountered: