go.nvim
go.nvim copied to clipboard
null-ls integration: sticky errors
Hi, I'm trying to configure the null-ls integration, and got it to work, but errors are not going away when a test if fixed.
By the way, I think there's an error in the code sample provided:
table.insert(sources, gotest, golangci_lint)
table.insert(sources, gotest_codeaction)
should be
table.insert(sources, gotest)
table.insert(golangci_lint)
table.insert(sources, gotest_codeaction)
According to https://www.lua.org/pil/19.2.html, gotest is considered as a position in this case, and the declaration will fail. Could you please confirm? Thanks
I noticed it as well. Might be something changed in null-ls.
I forgot to mention I'm using LazyVim (in case it could be related with that instead).
By the way, I'm also running into this: https://github.com/golangci/golangci-lint/issues/536 golangci-lint is apparently running on the current file only, if I understand this correctly: https://github.com/ray-x/go.nvim/blob/1be8ef7cdf2dd355b83f330b2e6861a992fcc432/lua/go/null_ls.lua#L200
Yes, it is meaningful to have it run on the active editing buffer. For any decent project, run a full lint scan each time on buffer save will just burn some CPU and memory.