summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2015-11-18 21:05:59 -0800
committerFranck Cuny <franckcuny@gmail.com>2015-11-18 21:05:59 -0800
commitd36125c200937c0c3a141bcfa6ad752150f3d415 (patch)
tree1868a7d01ccd8fc103131306604be926de8e26d0
parent[emacs] use leuven for the theme. (diff)
downloademacs.d-d36125c200937c0c3a141bcfa6ad752150f3d415.tar.gz
[emacs] add company-mode for golang.
-rw-r--r--emacs.d/inits/90_lang-go.el14
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))))))