Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4e-dev] LSP diagnostics don't seem to be supported when integrating with Eclipse

Thank you for the details and your help.

My original issue that I didn't mention was that the diagnostics didn't show up in the editors, but I managed to make it work. Our language server is built in a way that it doesn't initialize and start the core logic if textDocument/publishDiagnostics is not supported by the client. I removed that condition, now diagnostics are displayed.

So, after some investigation, I basically found the same as you mentioned, with a similar issue regarding Code Actions. In summary, what I see is, Eclipse
- announces that it doesn't support textDocument/pushDiagnostics, but the server can send them without issue, and diagnostics are displayed,
- announces that it supports codeAction/resolve, but the server connection doesn't call into the onCodeActionResolve() event handler, and the workspace edits must be computed during the textDocument/codeAction's event handler instead.

Now, that I've been able to proceed, I have a slightly different issue, that I would need some help with.
The file extensions that our server is registered for are "js,jsx,ts,tsx,py". However, .js files (only them) are not recognized as open documents. For .js files, the document-open event is not even triggered in our language server, thus no diagnostics, etc. are computed.

Since we have no filetype-specific logic in the server, I'm assuming there might be something on Eclipse side interfering with this, but I don't know what. Can you provide any pointer on this?

Tamás
------- Original Message -------
2023. március 2., csütörtök 16:00 keltezéssel, Mickael Istria <mistria@xxxxxxxxxx> írta:

Hello,

On Thu, Mar 2, 2023 at 12:12 PM Balog Tamás via lsp4e-dev <lsp4e-dev@xxxxxxxxxxx> wrote:
Our language server is implemented in TypeScript with the vscode-language-server-node package, so I'm executing a Node process from the Eclipse plugin. I see that the Node process starts properly, but when I inspect the client capabilities in the connection's InitializeParams, I see that both the textDocument/publishDiagnostics and the pull diagnostic related capabilities are false, meaning they are not supported by the client application (Eclipse).

pullDiagnostics and also newer capabilities for publishDiagnostics are indeed not supported. Please open an issue about it against the GitHub project, and consider contributing related work.

I find this odd considering that there are other language server integrations for Eclipse that work with diagnostics. I'm completely new to Eclipse plugin development, so, I don't know if I'm missing something, or misconfigured something.

Most language servers use the `publishDiagnostics`. This is part of the very first version of LSP specification and there is no capability to enable it or not; LSs are supposed to send them anyway. The capability are not toggling usage of publishDiagnostics, they only inform about some newer capabilities being supported or not.

HTH



Back to the top