2

My LSP config works perfectly for the current buffer, but sometimes I just want to check the whole project and find all problems. I know that folke/trouble.nvim could show workspace diagnostics, but how to collect it in one command? My projects are using typescript

1
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented May 6 at 9:39

2 Answers 2

2

Expounding on @artemave's answer, the workspace-diagnostics.nvim plugin sends the textDocument/didOpen events from neovim's LSP client to the language server for all files in the workspace. It does so by simply looping over each file in the workspace (via git ls-files, which doesn't seem like the most robust solution) and sending the command to the server. It is activated inside the on_attach callback inside the lspconfig setup() function for the corresponding language.

It is fully explained in the author's post.

-2

This plugin should do the trick https://github.com/artemave/workspace-diagnostics.nvim

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.