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



On Fri, Mar 3, 2023 at 11:29 AM Balog Tamás <picimako@xxxxxxxxxxxxxx> wrote:
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,

It's not really that LSP4E announces it's not supported, it's that (optional) advanced capabilities for textDocument/publishDiagnostics are not sent, but those aren't required for the LS to send diagnostics, as this operation was part of the very 1st version of the spec, before capabilites were necessary/useful. Basically, the spec mandates that publishDiagnostics is always supported.
Contrbutions to add support for the those newer capabilities would be very welcome though.
 
- 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.

This is supposed to be supported since https://github.com/eclipse/lsp4e/commit/2cf0a803936635a62d7fad2d05fde78bc7ce6a17 , but there might be a bug. Please verify with latest snapshots of LSP4E and report an issue with steps to reproduce (even ideally a test case) if this is not working as expected.

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.

Do you have some other plugin installed that could interfere in how .js files are loaded?


Back to the top