typescript-tools.nvim icon indicating copy to clipboard operation
typescript-tools.nvim copied to clipboard

Implement `textDocument/diagnostic`

Open pmizio opened this issue 2 years ago • 1 comments

Tsserver implements only diagnostic pull model(when client requests diagnostic), but currently it isn't supported by nvim. Plugin now implements compatibility layer to request for diagnostic and "synthetically" notify nvim about it. Nvim core bake support for diagnostic pull model in this pr https://github.com/neovim/neovim/pull/24128. When it land in nightly we want to make use of it and when it land into stable just cleanup old code and deprecate versions before it.

pmizio avatar Jul 03 '23 13:07 pmizio

I looked into the topic and for now we cannot use nvim implementation because nvim for now request diagnostic for current buffer only and we cannot update diagnostic in rest of visible ones. This is because nvim core doesn't follow full spec of LSP pull diagnostic model, in spec there is concept of relatedDocuments$ which allow to update other files diagnostic. Currently nvim doesn't support it. I'll try to make contribution to add this feature.

pmizio avatar Oct 27 '23 09:10 pmizio