7

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).

Robert Zaremba
  • 211
  • 1
  • 6
  • 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? – sircolinton Nov 04 '21 at 00:02
  • I'm looking for this too. Found a discouraging open issue: https://github.com/emacs-lsp/lsp-mode/issues/382 – Norman Ramsey Feb 02 '22 at 22:23
  • 1
    @sircolinton unfortuantely I didn't find anything better. `flycheck-list-errors` only inspects errors in the currently open file. – Robert Zaremba Jun 28 '22 at 15:55

1 Answers1

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.

Robert Zaremba
  • 211
  • 1
  • 6