-
Notifications
You must be signed in to change notification settings - Fork 446
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
Added getDocumentSymbols call to extension API #1151
Added getDocumentSymbols call to extension API #1151
Conversation
Signed-off-by: Ondřej Musil <[email protected]>
@testforstephen I fixed the issues that you pointed out but suddenly the calls started to fail with the following response error:
Any idea what could be causing this? Is it maybe a bug in the language server? Cause I'm calling the function exactly the same way like before with same parameters, but now with the DocumentSymbolRequest from vscode-languageclient and the token added. |
…ationToken to sendRequest call Signed-off-by: Ondřej Musil <[email protected]>
eca853b
to
3ed4670
Compare
Actually, now it's working fine. Just had to put in a check for undefined CancellationToken. After that it started working. |
Signed-off-by: Ondřej Musil <[email protected]>
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.
Looks good to me.
@testforstephen is there anything else that I need to do? Or when will this get merged? |
@omusil24 thanks for your contribution, keep 'em coming! |
Hello everyone,
at Qore Technologies we are working on a VSCode extension and in it we need support for finding symbols in Java files. Adding a whole language server in it and supporting it would be way too much work, especially since your extension already has everything we need. There just wasn't a way to call the language server you are using from outside the extension.
This PR adds function
getDocumentSymbols
to the extension API, which can then be called by other extensions. This function performstextDocument/documentSymbol
call to the language server and returns a promise with the result.If you have any questions just ask, or if this PR has incorrect style etc. then I can fix that, no problem.
Signed-off-by: Ondřej Musil [email protected]