Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/goimports: doc lists out-of-date go-mode.el configuration #24953

Closed
phillipao opened this issue Apr 19, 2018 · 2 comments
Closed

Comments

@phillipao
Copy link

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 dominikh/go-mode.el#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.)

@gopherbot gopherbot added this to the Unreleased milestone Apr 19, 2018
@dominikh
Copy link
Member

Really, the only line that is necessary is the first one. Emacs users will already have done all of the other necessary steps to get go-mode working.

@ALTree
Copy link
Member

ALTree commented Jul 1, 2019

This was fixed in golang/tools@1c3d964, so I'm closing this issue.

@ALTree ALTree closed this as completed Jul 1, 2019
@golang golang locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants