Set lsp-prefer-flymake to :none when Go layer is using LSP
When switching the Go layer to use the LSP backend with `golangci-lint`, I noticed that none of my linter errors were being rendered with my source code. Digging in further, I eventually learned it was due to `lsp-prefer-flymake` being set to `nil` and not `:none`. This change updates the Go layer, when using LSP and golangci-lint, to set `lsp-prefer-flymake` to `:none`. If this is not set, the golangci-lint errors will not be reported. This is an alternative to #12043. Fixes #11680 Signed-off-by: Tim Heckman <t@heckman.io>
This commit is contained in:
parent
a4801bec7b
commit
e84bd90262
|
@ -1300,6 +1300,8 @@ Other:
|
|||
- Added lsp support (thanks to Lupco Kotev)
|
||||
- Added golangci-lint support (thanks to Lupco Kotev)
|
||||
- Add toggle control for verbose go test output (thanks to Enze Chi)
|
||||
- Set lsp-prefer-flymake to :none when Go layer is using LSP (thanks to Tim
|
||||
Heckman)
|
||||
**** Graphviz
|
||||
- Use graphviz package from melpa (thanks to Matthew Boston)
|
||||
**** Groovy
|
||||
|
|
|
@ -37,7 +37,13 @@
|
|||
(defun spacemacs//go-setup-backend-lsp ()
|
||||
"Setup lsp backend"
|
||||
(if (configuration-layer/layer-used-p 'lsp)
|
||||
(lsp)
|
||||
(progn
|
||||
;; without setting lsp-prefer-flymake to :none
|
||||
;; golangci-lint errors won't be reported
|
||||
(when go-use-golangci-lint
|
||||
(message "[go] Setting lsp-prefer-flymake :none to enable golangci-lint support.")
|
||||
(setq-local lsp-prefer-flymake :none))
|
||||
(lsp))
|
||||
(message "`lsp' layer is not installed, please add `lsp' layer to your dotfile.")))
|
||||
|
||||
(defun spacemacs//go-setup-company-lsp ()
|
||||
|
|
Loading…
Reference in New Issue