Errors not showing consistently for golang files via LSP (gopls)

Hi there,

I am using neovim 0.7.2 to edit my golang projects and I use LSP (via go-pls) to provide error detection while editing my files.

I love the way errors are integrated within the code. The problem is error detection does not work consistently. I may be editing some file, save the file then I compile my project (in another terminal) and I get errors that neovim did not show up while editing the file.

Have you experienced this issue before? Is there something wrong in my config?

Here is my current lsp config.

Thank you,
-drd