nametake / golangci-lint-langserver

golangci-lint language server
MIT License
229 stars 20 forks source link

Linting error doesn't update when coding #24

Closed klesh closed 1 year ago

klesh commented 2 years ago

Using nvim-lspconfig configuration on nvim 0.7.2 with golang 1.19

When renaming variables, the linting error doesn't seem to update, unless I reload the file: image

klesh commented 2 years ago

saw sth in the debugging log, not sure if it was related:

[ERROR][2022-09-24 09:45:02] .../vim/lsp/rpc.lua:420    "rpc"   "golangci-lint-langserver"  "stderr"    "unexpected end of JSON input\n"
[ERROR][2022-09-24 09:45:51] .../vim/lsp/rpc.lua:420    "rpc"   "golangci-lint-langserver"  "stderr"    '2022/09/24 09:45:51 jsonrpc2 handler: notification "exit" handling error: jsonrpc2: code -32601 message: method not supported: exit\n'

I would try to fix the problem if someone could point me a direction :smile:

klesh commented 2 years ago

after some digging, I managed to pinpoint the offending error: image which decoded to the follow error message by base64 -d:

level=warning msg="[runner] Can't run linter goanalysis_metalinter: goheader: open .golangci-goheader.template: no such file or directory"
level=error msg="Running error: 1 error occurred:\n\t* can't run linter goanalysis_metalinter: goheader: open .golangci-goheader.template: no such file or directory\n\n"