-
-
Save erain/d390b26f164d52ed132b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; http://youtu.be/h8bsJV0-2qs | |
;; get the following packages: | |
;; go-mode | |
;; go-eldoc | |
;; company-mode | |
;; company-go | |
;; get the following go programs (run each line in your shell): | |
;; go get code.google.com/p/go.tools/cmd/goimports | |
;; go get code.google.com/p/rog-go/exp/cmd/godef | |
;; go get github.com/nsf/gocode | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(setq company-idle-delay nil) | |
(global-set-key (kbd "C-c M-n") 'company-complete) | |
(global-set-key (kbd "C-c C-n") 'company-complete) | |
(defun my-go-mode-hook () | |
(local-set-key (kbd "C-c m") 'gofmt) | |
(local-set-key (kbd "M-.") 'godef-jump)) | |
(set (make-local-variable 'company-backends) '(company-go))) | |
(add-hook 'go-mode-hook 'my-go-mode-hook) | |
(add-hook 'go-mode-hook 'go-eldoc-setup) | |
(add-hook 'go-mode-hook 'company-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment