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

return types to the client #278

Closed
barkanido opened this issue Oct 10, 2023 · 1 comment
Closed

return types to the client #278

barkanido opened this issue Oct 10, 2023 · 1 comment
Assignees

Comments

@barkanido
Copy link

Hi,
I am using pygls to write a vscode extension, and I wonder what types of "raw" data can be returned from the server to the client. For example, can I return Python strings or nested datatypes, or should I wrap them in the LSP protocol types?

@karthiknadig
Copy link
Member

If you are creating custom messages, then you can return anything that can be serialized. For specific request or response that is part of LSP, then in some cases it will allow you to return custom values. But remember, what ever you return it should have the structure of a Response message: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#responseMessage

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants