feat(linting): add golangci-lint

A fast Go linters aggregator for Gophers.
This commit is contained in:
Vo Quang Chien 2023-11-20 22:33:01 +07:00
parent 68ff818a5b
commit 6d08502cac
No known key found for this signature in database
GPG key ID: C572BB7FE229C539

View file

@ -0,0 +1,31 @@
return {
{
"mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"golangci-lint",
})
end,
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
go = { "golangcilint" },
},
},
},
{
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = vim.list_extend(opts.sources or {}, {
nls.builtins.diagnostics.golangci_lint,
})
end,
},
}