Skip to content

Configuration for Newest Version of golangci-lint #56

@harrisoncramer

Description

@harrisoncramer

This language server does not work with newer versions of golangci-lint. Here's my version:

$ golangci-lint version
golangci-lint has version 2.1.1 built with go1.24.2 from 93dabf9 on 2025-04-12T18:12:29Z

Here's my (previously functional) configuration. I'm using Neovim's new built-in LSP:

--- @class vim.lsp.Config
return {
	cmd = {
		"golangci-lint-langserver",
	},
	filetypes = { "go", "gomod" },
	init_options = {
		command = {
			"golangci-lint",
			"run",
			"--out-format=json",
			"--show-stats=false",
		},
	},
	root_markers = {
		".golangci.yml",
		".golangci.yaml",
		".golangci.toml",
		".golangci.json",
		"go.work",
		"go.mod",
		".git",
	},
}

The issue is that --out-format is not a valid flag anymore. Do we have a functional configuration for the newer version of golangci-lint?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions