x/tools/gopls: Emacs LSP not formatting the buffer according to before-save-hook #52392
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
gopls version
go env
What did you do?
Edit any
.go
file under Emacs, using the LSP + go mode, using the following hook when saving the file:What did you expect to see?
lsp-format-buffer
will format the buffer.What did you see instead?
buffer not formatted. Here is the saved file:
Editor and settings
Emacs (v28.1 compiled from git source
emacs-28.1
branch), using the LSP + go mode.See above, and here is my whole init.el part:
Logs
Both the
gopls
andgopls::stderr
buffer are empty.The log from
Messages
in Emacs shows Timeout:I have also seen
LSP :: No formatting changes provided
line between theSaving
andWrote
lines sometime.The log from
*lsp-log*
in Emacs looks good, except theCancelling
lines at the bottom:What causes all those
Cancelling
s and timeouts?The text was updated successfully, but these errors were encountered: