I'm trying to use Golang with LSP in Emacs 27.2 (Fedora 35) but whenever I run M-x lsp-mode it shows as disconnected and when I try to run M-x lsp it shows the Lisp error: (void-function -compose).

Everything was installed through MELPA and everything is up to the latest versions.

gopls is reachable through my PATH.

Be noted that updating the dash package and deleting every other instance of it didn't work.

1 Answer 1


I note that you updated dash.el. Following that, you should also try re-compiling gopls.el. The easiest way to be sure of getting this right is to reinstall it.

The reason is that you may (should) be using the compiled version of gopls.el, which will be in a file called gopls.elc, and this will have been compiled against the earlier version of dash. Alternatively, you can just delete the .elc file and Emacs will correctly find the current -compose function at runtime, at the cost of a small performance hit.

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.