-
Notifications
You must be signed in to change notification settings - Fork 23
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 |
@DanCip00 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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.
Do you think it would be better for this to be an enum?
And instead of having "python_server", we can have "language_server"?
We can discuss what you think is better.
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.
Wouldn't we be redefining multilspy.language_server
that way?
Removed extra await that blocks code completion for python Language Servers
Closes #9