go.nvim icon indicating copy to clipboard operation
go.nvim copied to clipboard

null-ls integration: sticky errors

Open gravis opened this issue 2 years ago • 4 comments

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

gravis avatar Apr 11 '23 20:04 gravis

I noticed it as well. Might be something changed in null-ls.

ray-x avatar Apr 12 '23 04:04 ray-x

I forgot to mention I'm using LazyVim (in case it could be related with that instead).

gravis avatar Apr 12 '23 08:04 gravis

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

gravis avatar Apr 12 '23 19:04 gravis

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.

ray-x avatar Apr 13 '23 00:04 ray-x