-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add search definition and declaration for symbols from stdlib #47
Comments
That is a good solution, but it will require the user to have the spurces of the stdlib. There is another option and is to include the stdlib with the lsp server and use the functionality 'virtual document' of the lsp proto ol. Haven't look at the specification deeply, but as I understood the lsp can deliver a reference to a document+ the document itself and the editor should display it. |
A future 3.18 version of LSP will add a workspace/textDocumentContent method that provides document content. Another option is to add a custom handler to return virtual documents, but the |
In that case, I would analyze what's cheaper to implement:
|
I'm implementing a config file by project, and though I could add there the path to the stdlib sources.
|
@pherrymason It's gonna be great |
Implemented in branch Create a
|
Implemented in v0.3.0 |
Currently, searching for definitions for symbols from
stdlib
is not supported (TextDocumentDefinition
andTextDocumentDeclaration
handlers). I don't mind helping to implement this functionality. I see the following steps for implementation:stdlib
, add ranges and document uri to all definitionsstdlib
at LSP server startupstdlib
stdlib
, then load its module and resolve the absolute file path.Let me know if I missed something.
The text was updated successfully, but these errors were encountered: