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

Contribution by @DanCip00: PyRight integration #39

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

LakshyAAAgrawal
Copy link
Collaborator

@LakshyAAAgrawal LakshyAAAgrawal commented Dec 31, 2024

From #10:
Removed extra await that blocks code completion for python Language Servers

Closes #9

DanCip00 and others added 5 commits October 23, 2024 23:53
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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be pyright?

Copy link
Collaborator Author

@LakshyAAAgrawal LakshyAAAgrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@@ -497,7 +503,8 @@ async def request_completions(

num_retries = 0
while response is None or (response["isIncomplete"] and num_retries < 30):
await self.completions_available.wait()
if self.language_id != 'python':
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stuck trying to launch pyright language server
3 participants