-
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
Stuck trying to launch pyright language server #9
Comments
Ah, and I forgot to mention that with jedi it worked fine without any issue. |
#10 I think this solves your problem 💪 |
@DanCip00 I don't see much difference, it still gets stuck for me when I try to make some request to the lsp server. I did notice the following,
But while I was debugging it never got stuck there, it gets stuck when I make a For one use case (it happens in possibly all other) I've pinpointed to the following position, with self.open_file(relative_file_path):
# sending request to the language server and waiting for response
response = await self.server.send.definition(
{
LSPConstants.TEXT_DOCUMENT: {
LSPConstants.URI: pathlib.Path(
str(PurePath(self.repository_root_path, relative_file_path))
).as_uri()
},
LSPConstants.POSITION: {
LSPConstants.LINE: line,
LSPConstants.CHARACTER: column,
},
}
)
print("Stuck here?") that async def request_definition(
self, relative_file_path: str, line: int, column: int
) -> List[multilspy_types.Location]: method in |
For some reason, the |
Hi @maths-lover and @DanCip00, I apologize for getting back so late on this. @maths-lover could you please confirm if @DanCip00's fix works now? If yes, could you please contribute a unittest for your specific situation, and I will merge both the unittest and solution PRs? |
I do a simple copy of jedi-language-server, replace jedi calls to pyright, everything seems to work except the request goes to stdin (not sure if they actually do) but no response comes back.
A demo can be seen in the following asciicast
Please provide me insight if I'm doing something wrong here.
Thank you!
The text was updated successfully, but these errors were encountered: