diff --git a/lua/astrocommunity/pack/go/README.md b/lua/astrocommunity/pack/go/README.md index 9e8b00bcd..99ccb00d8 100644 --- a/lua/astrocommunity/pack/go/README.md +++ b/lua/astrocommunity/pack/go/README.md @@ -15,3 +15,4 @@ This plugin pack does the following: - [impl](https://github.com/josharian/impl) - Adds [nvim-dap-go](https://github.com/leoluz/nvim-dap-go) for debugging - Adds [gopher.nvim](https://github.com/olexsmir/gopher.nvim) for language specific tools +- Adds [golangcilint](https://github.com/golangci/golangci-lint) for linting diff --git a/lua/astrocommunity/pack/go/init.lua b/lua/astrocommunity/pack/go/init.lua index bedd7aeb0..3c00e815e 100644 --- a/lua/astrocommunity/pack/go/init.lua +++ b/lua/astrocommunity/pack/go/init.lua @@ -73,7 +73,7 @@ return { opts = function(_, opts) opts.ensure_installed = require("astrocore").list_insert_unique( opts.ensure_installed, - { "gomodifytags", "iferr", "impl", "gotests", "goimports" } + { "gomodifytags", "iferr", "impl", "gotests", "goimports", "golangci_lint" } ) end, }, @@ -90,7 +90,7 @@ return { opts = function(_, opts) opts.ensure_installed = require("astrocore").list_insert_unique( opts.ensure_installed, - { "delve", "gopls", "gomodifytags", "gotests", "iferr", "impl", "goimports" } + { "delve", "gopls", "gomodifytags", "gotests", "iferr", "impl", "goimports", "golangci-lint" } ) end, }, @@ -155,4 +155,13 @@ return { }, }, }, + { + "mfussenegger/nvim-lint", + optional = true, + opts = { + linters_by_ft = { + go = { "golangcilint" }, + }, + }, + }, }