mirror of
https://github.com/golang/go
synced 2024-11-18 08:44:43 -07:00
cmd/guru: update Emacs installation documentation
I was going to add a hook to enable go-guru-hl-identifier-mode as a side effect of go-mode, but a person I consulted said that was bad form; instead I merely documented it. Change-Id: I48b00b71c7ba485b3d632211923509a74281acbe Reviewed-on: https://go-review.googlesource.com/24834 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
9c3986db53
commit
92480e4760
@ -10,14 +10,38 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; To install the Go guru, run:
|
||||
;; To enable the Go guru in Emacs, use this command to download,
|
||||
;; build, and install the tool in $GOROOT/bin:
|
||||
;;
|
||||
;; $ go get golang.org/x/tools/cmd/guru
|
||||
;; $ go get golang.org/x/tools/cmd/guru
|
||||
;;
|
||||
;; Load this file into Emacs and set go-guru-scope to your
|
||||
;; configuration. Then, find a file of Go source code,
|
||||
;; select an expression of interest, and press `C-c C-o d' (for "describe")
|
||||
;; or run one of the other go-guru-xxx commands.
|
||||
;; Verify that the tool is on your $PATH:
|
||||
;;
|
||||
;; $ guru -help
|
||||
;; Go source code guru.
|
||||
;; Usage: guru [flags] <mode> <position>
|
||||
;; ...
|
||||
;;
|
||||
;; Then copy this file to a directory on your `load-path',
|
||||
;; and add this to your ~/.emacs:
|
||||
;;
|
||||
;; (require 'go-guru)
|
||||
;;
|
||||
;; Inside a buffer of Go source code, select an expression of
|
||||
;; interest, and type `C-c C-o d' (for "describe") or run one of the
|
||||
;; other go-guru-xxx commands. If you use `menu-bar-mode', these
|
||||
;; commands are available from the Guru menu.
|
||||
;;
|
||||
;; To enable identifier highlighting mode in a Go source buffer, use:
|
||||
;;
|
||||
;; (go-guru-hl-identifier-mode)
|
||||
;;
|
||||
;; To enable it automatically in all Go source buffers,
|
||||
;; add this to your ~/.emacs:
|
||||
;;
|
||||
;; (add-hook 'go-mode-hook #'go-guru-hl-identifier-mode)
|
||||
;;
|
||||
;; See http://golang.org/s/using-guru for more information about guru.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user