From 248876adb6b1f54031be350e45bbf0c7835d486f Mon Sep 17 00:00:00 2001 From: Bahaa Mohamed <107966806+Bahaaio@users.noreply.github.com> Date: Mon, 20 Oct 2025 12:12:20 +0300 Subject: [PATCH] feat(go): add linting with golangci-lint (#6311) ## Description 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) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/go.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index 77536fea..86f984f5 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -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,