-
Notifications
You must be signed in to change notification settings - Fork 26
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
How do you publish diagnostics with this library? #11
Comments
The documentation simply says that you can return a result and an error, the latter being "code and message", which is a little too thin. I interpret this to imply that different implementations might handle the "error" differently... |
But if you had to implement such a functionality, how would you do it?
The ability to perform an action a line of code and edit the current
document to include the result of the action into the page.
…On Sun, Jun 26, 2022, 00:06 Tal Liron ***@***.***> wrote:
The documentation
<https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#workspace_executeCommand>
simply says that you can return a result and an error, the latter being
"code and message", which is a little too thin. I interpret this to imply
that different implementations might handle the "error" differently...
—
Reply to this email directly, view it on GitHub
<#11 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSCVASKLDSH6T5IW2I4GEDVQ57H5ANCNFSM5Z23QXGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have never done so myself. Perhaps other users can chime in with advice? |
I implemented diagnostics with glsp, you can take a look here: I refresh them when receiving It looks like this in Neovim: I didn't use the |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hi, first of all, thanks for the tremendous amount of work you put into this library.
I'm implementing an LSP for a doctest library which I wrote (https://github.com/apitoolkit/doctests), and the way it should work is such that a user can add golang expressions into their comments, and they can execute those expressions like an inline repl. But the documentation of LSPs has been tough so far. Including on the official lsp spec website. So maybe you can help me better.
I've been able to implement this functionality in 2 ways already, but each way doesn't completely give me what I would like or expect.
I implement the
TextDocumentCodeLens
which triggers code commands. But the problem is that in theWorkspaceExecuteCommand
handler, the return type is just an interface, so I'm completely clueless about how to update the document i'm in like with code actions. So I end up editing the file on disk in the execute command function, but then the user has to reload the file from disk to see the changes i made, or risk making more changes and overwritting the files on disk.Is there a type/data that i can return from executeCommand, to make it edit the current text document instead of by passing the editor to directly edit the file on disk?
The text was updated successfully, but these errors were encountered: