golang / gddo

Go Doc Dot Org
https://godoc.org
BSD 3-Clause "New" or "Revised" License
1.1k stars 266 forks source link

goimports doc lists out-of-date go-mode.el configuration #551

Closed phillipao closed 6 years ago

phillipao commented 6 years ago

https://godoc.org/golang.org/x/tools/cmd/goimports

It says to add the following to .emacs:

(setq gofmt-command "goimports")
(add-to-list 'load-path "/home/you/somewhere/emacs/")
(require 'go-mode-autoloads)
(add-hook 'before-save-hook 'gofmt-before-save)

go-mode-autoloads is no longer used by go-mode (see https://github.com/dominikh/go-mode.el/issues/222), and this line will probably produce an error. That line should be removed.

Also, I found the add-to-list line confusing, because it's not clear from context whether this is optional or required. Might be good to remove that, and then say something like "This searches load-path for goimports, so you may need to add the goimports location to load-path." (Sorry for this separate issue. Feel free to tell me to break it out to a separate issue if it's too large or controversial.)

dmitshur commented 6 years ago

This issue tracker is for the gddo (godoc.org) project itself. You're referring to a package in the x/tools subrepo. People who work on goimports will not see it here.

The right issue tracker is for the x/tools subrepo is at https://golang.org/issues. You can see all the existing goimports issues at https://goissues.org/golang.org/x/tools/cmd/goimports.

Would you mind checking if the issue is already reported there, and if not, send it to that issue tracker? Thanks. I'll close this, because it's not a bug in gddo.