Closed admacro closed 4 years ago
godoc-gogetdoc
is not interactive, so you need to bind it to a key. You can also eval it directly (e.g. M-:
"(godoc-gogetdoc)").
I recommend you look at gopls and lsp-mode. LSP supports viewing documentation among many other things.
The way its intended to be used is you set godoc-at-point-function
to godoc-gogetdoc
and then you call godoc-at-point
to invoke it:
(defcustom godoc-at-point-function #'godoc-and-godef
"Function to call to display the documentation for an
identifier at a given position.
This package provides two functions: `godoc-and-godef' uses a
combination of godef and godoc to find the documentation. This
approach has several caveats. See its documentation for more
information. The second function, `godoc-gogetdoc' uses an
additional tool that correctly determines the documentation for
any identifier. It provides better results than
`godoc-and-godef'."
:type 'function
:group 'godoc)
thank you @psanford, I got it working.
(setq godoc-at-point-function 'godoc-gogetdoc)
thanks @muirdm for the recommendation. I already use lsp-mode. I tried lsp-ui but it's a bit too much for me, as I only need to look up some doc on demand.
Hi, I discovered
godoc-gogetdoc
symbol today, but it's not in the M-x command list. How can I invoke it? (I've installedgogetdoc
)go-mode version:
20200425.1740
emacs version:"GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-09-02"