-
Notifications
You must be signed in to change notification settings - Fork 6
Description
I'm testing out using LSPX with python running lspx --lsp "pyright-langserver --stdio" --lsp "ty server" --lsp "ruff server".
I see all the ty type annotations but the diagnostic error/warning results being sent to flymake don't persist. When editing the buffer the following happens (assuming there are diagnostics to report):
tydiagnostics show up very quickly for a very brief instantruffdiagnostics show up for a moment right afterwards, removing thetydiagnosticspyrightdiagnostics show up last, removing all thetyandruffdiagnostics to only leave their own.
This happens even if ruff and pyright return empty diagnostics and come in order of response speed. I added a (message "%S" diags) inside of the eglot diagnostic code for tracing and see them showing up sequentially with only their own diagnostics. Eglot has logic in place to clear all diagnostics when a new set comes in to avoid any stale diagnostics being left behind (in particular if they come from another file, but also since the diagnostics would only update their region otherwise). emacs-lsp/lsp-mode#2808 and joaotavora/eglot#1429 (reply in thread)
eglot is just seeing each return as a new set of diagnostics, which it is, rather than an addition to the existing ones, which technically it also is. Would there be a way to have lspx append subsequent diagnostics/responses for a given file changeset so that when they respond at different speeds you'd get ty then ty+ruff then ty+ruff+pyright (from the example above) as long as no new changes have been sent?