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:
Bahaa Mohamed
2025-10-20 12:12:20 +03:00
committed by GitHub
parent 4d0d87f626
commit 248876adb6

View File

@@ -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,