mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(linting): add golangci-lint
A fast Go linters aggregator for Gophers.
This commit is contained in:
parent
68ff818a5b
commit
6d08502cac
1 changed files with 31 additions and 0 deletions
31
lua/lazyvim/plugins/extras/linting/golangci-lint.lua
Normal file
31
lua/lazyvim/plugins/extras/linting/golangci-lint.lua
Normal 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,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue