Add go to go

This commit is contained in:
Maciej 2018-01-06 21:22:59 +02:00
parent e122cca29d
commit 979c0e8787
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
6 changed files with 45 additions and 2 deletions

27
languages/go.el Normal file
View file

@ -0,0 +1,27 @@
;;; Go -- summary
;;; Commentary:
;; Code:
;;========== Editor config =========================
(defun editor-config-go ()
"Editor configuration for Go."
(set-indent 4)
(set-width-99))
;;========== Code completion =======================
(defun completion-config-go ()
"Code completion and inspection for Go."
(company-mode 1)
(flycheck-mode 1)
(flymake-mode 1)
(set (make-local-variable 'company-backends)
'((company-go company-capf company-dabbrev-code company-yasnippet
company-files))))
;;========== Hooks =================================
(add-hook 'go-mode-hook 'editor-config-go)
(add-hook 'go-mode-hook 'completion-config-go)
(provide 'go)
;;; go.el ends here