The Problem

Performance issues when point is inside/on a symbol go-eldoc/gocode has info for.

Based on my interaction with emacs I would guess that the problem has something to do with gocode being queried on the main thread, and taking to long to respond. Is this correct thinking? Is there something wrong with my configuration?

The Environment

Using https://github.com/syohex/emacs-go-eldoc with

go get -u github.com/stamblerre/gocode https://github.com/stamblerre/gocode

as the gocode implementation on my machine for the module support

Using use-package https://github.com/jwiegley/use-package to load it

(use-package go-mode
  :defer 2
  :mode "\\.go\\'")

(use-package go-eldoc
  :defer 2
  :hook (go-mode . go-eldoc-setup))

Part of the problem seems that the gocode version I am using is slow, but it still should not hang/lag while moving around or typing.

  • Not a solution but a workaround might be to configure eldoc to trigger only after certain commands (I have set it up to only trigger after SPC insertion or S-SPC to view eldoc help without inserting anything). This is the setup I use for all modes. – clemera Sep 14 '19 at 9:26
  • @clemera How did you toggle the eldoc-mode, or temporaraly turn it on? – SultanLegend Sep 16 '19 at 15:34
  • @clemera Willing to try to help further? emacs.stackexchange.com/questions/52687/… Is what I have thus far – SultanLegend Sep 16 '19 at 15:49
  • I have made a gist which you can use to adapt for your config – clemera Sep 30 '19 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.