This package provides a
completion-at-point function to complete go
code using gocode, offering context-base suggestions for functions,
variables and types without having to save the buffer.
go-capf doesn't require anything to be installed besides
gocode as an external component (which can be installed with a simple
go install ...), a better looking completion front-end in Emacs, such
as ivy might be worth recommending.
Using MELPA and
use-package, a minimal but sufficient setup might look
something like this:
(use-package go-capf :after go-mode :config (add-hook 'go-mode-hook (lambda () (add-hook 'completion-at-point-functions #'go-capf nil t))))
This will let
completion-at-point know that it should try
first when looking for completions, in
Also make sure that
In vanilla Emacs:
()for functions or
Any further bugs or questions can be submitted to my public inbox.
go-capf.el is distributed under the CC0 1.0 Universal (CC0 1.0)
Public Domain Dedication license.