Skip to content

Commit 2467e24

Browse files
feat(go): Add golangcilint as default linter (#1213)
* Add golangci linter to go pack Update readme * add missing mason and none-ls configuration --------- Co-authored-by: Micah Halter <[email protected]>
1 parent 053f3d2 commit 2467e24

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lua/astrocommunity/pack/go/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ This plugin pack does the following:
1515
- [impl](https://github.com/josharian/impl)
1616
- Adds [nvim-dap-go](https://github.com/leoluz/nvim-dap-go) for debugging
1717
- Adds [gopher.nvim](https://github.com/olexsmir/gopher.nvim) for language specific tools
18+
- Adds [golangcilint](https://github.com/golangci/golangci-lint) for linting

lua/astrocommunity/pack/go/init.lua

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ return {
7373
opts = function(_, opts)
7474
opts.ensure_installed = require("astrocore").list_insert_unique(
7575
opts.ensure_installed,
76-
{ "gomodifytags", "iferr", "impl", "gotests", "goimports" }
76+
{ "gomodifytags", "iferr", "impl", "gotests", "goimports", "golangci_lint" }
7777
)
7878
end,
7979
},
@@ -90,7 +90,7 @@ return {
9090
opts = function(_, opts)
9191
opts.ensure_installed = require("astrocore").list_insert_unique(
9292
opts.ensure_installed,
93-
{ "delve", "gopls", "gomodifytags", "gotests", "iferr", "impl", "goimports" }
93+
{ "delve", "gopls", "gomodifytags", "gotests", "iferr", "impl", "goimports", "golangci-lint" }
9494
)
9595
end,
9696
},
@@ -155,4 +155,13 @@ return {
155155
},
156156
},
157157
},
158+
{
159+
"mfussenegger/nvim-lint",
160+
optional = true,
161+
opts = {
162+
linters_by_ft = {
163+
go = { "golangcilint" },
164+
},
165+
},
166+
},
158167
}

0 commit comments

Comments
 (0)