How can I set up
golangci-lint as the linter with my config? I've tried using
flycheck-golangci-lint but it doesn't seem to be working. I'm testing my config by opening a .go file with an ineffectual assignment that trips
golangci-lint when run from the CLI tool. My Go and LSP configs are:
;; lsp-mode configs (use-package lsp-mode :delight lsp-lens-mode "🔍" :ensure t :init ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") (setq lsp-keymap-prefix "C-c l") :custom (lsp-auto-guess-root +1) :config (lsp-enable-imenu) (setq lsp-prefer-flymake nil) (setq lsp-headerline-breadcrumb-enable t) :hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode) (python-mode . lsp-deferred) (scala-mode . lsp-deferred) (sh-mode . lsp-deferred) (go-mode . lsp-deferred) ;; if you want which-key integration (lsp-mode . lsp-enable-which-key-integration) (lsp-mode . lsp-lens-mode) (lsp-after-open . 'lsp-enable-imenu) ) :commands (lsp lsp-deferred)) ;; go-mode (use-package go-mode :delight "" :hook (before-save . lsp-format-buffer) (before-save . lsp-organize-imports) ) ;; flycheck-golang-ci-lint (use-package flycheck-golangci-lint :ensure t :hook (go-mode . flycheck-golangci-lint-setup) )
Apologies for the wall of code - I want to make sure I don't miss anything that might be causing
flycheck-golang-ci-lint to fail.