Contribution by @DanCip00: PyRight integration#39
Contribution by @DanCip00: PyRight integration#39LakshyAAAgrawal wants to merge 6 commits intomainfrom
Conversation
Removed extra await that blocks code completion using Python Servers
Bugfix - code completion with python servers
| self.server.on_notification("language/actionableNotification", do_nothing) | ||
|
|
||
| async with super().start_server(): | ||
| self.logger.log("Starting jedi-language-server server process", logging.INFO) |
LakshyAAAgrawal
left a comment
There was a problem hiding this comment.
Thank you so much for the great PR! This solves a long-problem I have struggled with, to get pyright working. Can you please just address the 2 followings reviews and I will be quick to merge!
| config, | ||
| logger, | ||
| repository_root_path, | ||
| ProcessLaunchInfo(cmd="basedpyright-langserver --stdio", cwd=repository_root_path), |
There was a problem hiding this comment.
Could we please add at least a temporary setup_runtime_dependencies method, which for now just checks if "basedpyright-langserver" is installed, and if not, then links to a URL which guides how to install it, and fails gracefully with the error message
| num_retries = 0 | ||
| while response is None or (response["isIncomplete"] and num_retries < 30): | ||
| await self.completions_available.wait() | ||
| if self.language_id != 'python': |
There was a problem hiding this comment.
Would it instead be better to go to the langserver file for these language servers, and just mark the self.completions_available as True in the langserver setup?
| "groupsOnLabel": true | ||
| } | ||
| }, | ||
| "configuration": true, |
There was a problem hiding this comment.
configuration should be set to false, or pyright will send a sequence of workspace/configuration requests which will fail and cause the initialization to fail.
|
Changing "configuration": true to "configuration": false in the initialize_params.json solves the pyright integration issue for me. |
From #10:
Removed extra await that blocks code completion for python Language Servers
Closes #9