8

When opening a Go project with LSP mode, spacemacs / flycheck only shows errors in the current package, not including tests files. For example, in the following project:

|- pkg1
|- pkg2
|- cmd

When I'm in the pkg1/file.go file all of the following functions won't display errors from pkg2, cmd nor test files in pkg1:

  • next-error, flycheck-next-error, flycheck-projectile-list-errors, flycheck-list-errors.

The only function which displays all error is: lsp-treemacs-errors-list, but it's not very friendly: there is no way to jump to the next error without going to the lsp-treemacs-errors-list buffer, scrolling, unfolding and entering the error.

My setup: emacs 26.3, spacemacs @develop (latest), go layer with LSP mode + flycheck layer. (LSP mode works perfectly).

3
  • I'm also looking for this. In particular, I'm looking for an lsp-next-error function, or alternatively, for opening lsp-treemacs-errors-list to inform next-error, so that next-error descends the list of reported errors. Did you find anything in your travels, Robert? Nov 4, 2021 at 0:02
  • I'm looking for this too. Found a discouraging open issue: github.com/emacs-lsp/lsp-mode/issues/382 Feb 2, 2022 at 22:23
  • 1
    @sircolinton unfortuantely I didn't find anything better. flycheck-list-errors only inspects errors in the currently open file. Jun 28, 2022 at 15:55

1 Answer 1

0

There is a package flycheck-projectile which lists all errors in the package.example

It takes a bit of time to load, but then in watches for changes and it's very fast.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.