diff options
author | Franck Cuny <franckcuny@gmail.com> | 2015-11-18 21:05:59 -0800 |
---|---|---|
committer | Franck Cuny <franckcuny@gmail.com> | 2015-11-18 21:05:59 -0800 |
commit | d36125c200937c0c3a141bcfa6ad752150f3d415 (patch) | |
tree | 1868a7d01ccd8fc103131306604be926de8e26d0 /emacs.d/inits | |
parent | [emacs] use leuven for the theme. (diff) | |
download | emacs.d-d36125c200937c0c3a141bcfa6ad752150f3d415.tar.gz |
[emacs] add company-mode for golang.
Diffstat (limited to '')
-rw-r--r-- | emacs.d/inits/90_lang-go.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/emacs.d/inits/90_lang-go.el b/emacs.d/inits/90_lang-go.el index 8e6a565..94c44ef 100644 --- a/emacs.d/inits/90_lang-go.el +++ b/emacs.d/inits/90_lang-go.el @@ -3,6 +3,10 @@ :defer t :init (add-hook 'go-mode-hook 'go-eldoc-setup)) +(use-package company-go + :ensure t + :defer t) + (use-package go-mode :ensure t :defer t @@ -11,8 +15,8 @@ (bind-key "C-c C-f" 'gofmt go-mode-map) (bind-key "C-c h" 'godoc go-mode-map) (bind-key "C-c C-g" 'go-goto-imports go-mode-map) - (bind-key "C-c C-r" 'go-remove-unused-imports go-mode-map))) - -(use-package company-go - :ensure t - :defer t) + (bind-key "C-c C-r" 'go-remove-unused-imports go-mode-map)) + :init + (progn (add-hook 'go-mode-hook (lambda () + (go-eldoc-setup) + (set (make-local-variable 'company-backends) '(company-go)))))) |