-
Notifications
You must be signed in to change notification settings - Fork 30
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
Bugfix - code completion with python servers #10
base: main
Are you sure you want to change the base?
Conversation
Removed extra await that blocks code completion using Python Servers
Dear @DanCip00 , Thanks a lot for your PR! Have you been able to get pyright working with this change? |
Hi, I was trying to use your code to request completion in Python using Pyright and I ran into the same problem #10. Now it works fine for me. But now that I think about it maybe it's better to wrap the line around an if statement like this:
|
I would actually recommend creating a separate class for pyright, copying the full code for jedi, while modifying the following three lines: https://github.com/microsoft/multilspy/blob/main/src/multilspy/language_servers/jedi_language_server/jedi_server.py#L82C1-L84C49 These lines in the jedi client wait for jedi to report completions available, and sets the corresponding flag. Since it appears that this is not needed in pyright, you can directly make a call to this in start_server, before yielding. Could you please make that change? |
BTW, thanks a lot for this PR. I wasn't aware that this was the issue blocking pyright to work with multilspy. Thanks a lot for debugging this! Please feel free to let me know iif I can help with anything on the PR. |
I am encountering the same issue of infinite waiting even when using I am not an expert on the matter, but my hypothesis is that this call has not been implemented in the |
venv/ | ||
|
||
fake_repo/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can you remove fake_repo/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a setup_runtime_dependencies function here, so that users who do not have basedpyright installed in their environment can load it seamlessly?
Please let me know if you would like any help with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @DanCip00, Thanks a lot for the PR and I am sorry for getting back so late on this.
I believe the PR is in good shape. Would it be possible for you to just add the setup_runtime_dependencies for PyRight? If not, I could try to work on it and then immediately proceed with merging the PR.
@DanCip00 can you please accept the CLA? |
@microsoft-github-policy-service agree |
Removed extra await that blocks code completion for python Language Servers
Closes #9