use {"artemave/workspace-diagnostics.nvim"}
Plug "artemave/workspace-diagnostics.nvim"
require("lazy").setup({"artemave/workspace-diagnostics.nvim"})
Populate workspace diagnostcs when an lsp client is attached:
require('lspconfig').tsserver.setup({
on_attach = function(client, bufnr)
...
require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr)
...
end
})
Despite its placement, populate_workspace_diagnostics
will actually do the work only once per client.
You can configure a different function that returns a list of project files (it defaults to the output of git ls-files
).
require("workspace-diagnostics").setup({
workspace_files = function()
return { 'index.js', 'lib/banana.js' }
end
})
PRs and issues are always welcome. Make sure to provide as much context as possible when opening one.
To run make lint
locally, you'd need to install stylua:
cargo install stylua --features lua52