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

Use properly virtualized text documents in VSCode #1147

Open
MulverineX opened this issue May 14, 2024 · 1 comment
Open

Use properly virtualized text documents in VSCode #1147

MulverineX opened this issue May 14, 2024 · 1 comment
Labels
🔷 custom-lsp Custom language server protocol communications ✨ feature New feature or request 👍 good first issue Issues that are easy to work on for new code contributors /vscode-extension
Milestone

Comments

@MulverineX
Copy link
Member

MulverineX commented May 14, 2024

When using the language server within VSCode, use properly virtualized text documents, rather than virtual-uris

@MulverineX MulverineX added ✨ feature New feature or request /vscode-extension labels May 14, 2024
@MulverineX MulverineX added this to the Backlog milestone May 14, 2024
@MulverineX MulverineX changed the title When using the language server within VSCode, use properly virtualized text documents, rather than virtual-uris Use properly virtualized text documents in VSCode May 14, 2024
@SPGoding
Copy link
Member

SPGoding commented May 15, 2024

To properly implement this with best possible interoperability, we need to add a custom field in the LSP client->server initialization request for clients to indicate if they support opening virtualized text documents. The server should use the current virtual-uris implementation for go-to-definition requests on archive: URIs if the client does not indicate the capability, or send a custom server->client notification spyglassmc/open-virtual-text-document with { uri: string, content: string } params otherwise. vscode-extension should indicate the capability, implement a handler for the custom notification, and open the document virtually when needed.

(This is "👍 good first issue" in the sense that I wrote some instructions on various parts of the systems you'd need to touch, not that it is an easy one liner. Let me know if you have any questions.)

@SPGoding SPGoding added 👍 good first issue Issues that are easy to work on for new code contributors 🔷 custom-lsp Custom language server protocol communications labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔷 custom-lsp Custom language server protocol communications ✨ feature New feature or request 👍 good first issue Issues that are easy to work on for new code contributors /vscode-extension
Projects
None yet
Development

No branches or pull requests

2 participants