mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-12-25 12:14:19 +01:00
feat(go): add linting with golangci-lint (#6311)
## Description <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> Add Go linting support using [golangci-lint](https://github.com/golangci/golangci-lint) and nvim-lint. - Installs golangci-lint via Mason. - Configures nvim-lint to run it on Go files. This improves the Go development experience by running a fast, popular linter automatically ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> None ## Screenshots <!-- Add screenshots of the changes if applicable. --> ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
@@ -97,6 +97,22 @@ return {
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- Add linting
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
opts = { ensure_installed = { "golangci-lint" } },
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
go = { "golangcilint" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
|
||||
Reference in New Issue
Block a user