dominikh / go-mode.el

Emacs mode for the Go programming language
BSD 3-Clause "New" or "Revised" License
1.37k stars 209 forks source link

"Computing fix edits" appears constantly #364

Closed cflewis closed 3 years ago

cflewis commented 4 years ago

The LSP server is being pinged constantly, and so typing even something simple results in things not compiling (obviously, I haven't finished yet!)

So you see a message like

LSP :: computing fix edits
<snip> missing , in argument list

This flickers up and down constantly. Can these messages be suppressed until save or something?

This is the same issue as reported on StackOverflow: https://emacs.stackexchange.com/questions/58262/how-to-suppress-lsp-message-from-flickering-the-minibuffer-height

As the reporter there sad, it would indeed be sad to lose the helpful function descriptions.

muirdm commented 4 years ago

This sounds like an issue with your LSP client or LSP server, not go-mode (go-mode is not involved in LSP related things). What LSP package are you using, and what version of gopls are you using? Can you try updating to the latest stable gopls release?

It looks like this error will pop up if you request code actions from gopls when there is a syntax error. Perhaps something in your Emacs config is requesting code actions after every keystroke. If the error persists after updating, I would collect gopls RPC trace debug logs to see the back and forth messages.

muirdm commented 3 years ago

Fix in gopls on master via https://go-review.googlesource.com/c/tools/+/243238. Note that you will still see syntax errors show up in the minibuffer using lsp-mode, but the really spammy "computing fix edits" errors are gone.