Created
March 30, 2016 20:32
-
-
Save abperiasamy/5c1d2a7c879f6d1d5faf00eaf3710925 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
; Go mode | |
(add-to-list 'load-path "~/.emacs.d/extensions/") | |
(require 'go-mode-autoloads) | |
(require 'auto-complete) | |
(require 'auto-complete-config) | |
(require 'go-autocomplete) | |
(require 'go-flycheck) | |
(add-hook 'after-init-hook #'global-flycheck-mode) | |
(global-auto-complete-mode t) | |
;; Enable auto-fill mode for comments. | |
(defun comment-auto-fill () | |
(setq-local comment-auto-fill-only-comments t) | |
(auto-fill-mode 1)) | |
(defun go-mode-setup () | |
(add-hook 'before-save-hook 'gofmt-before-save) | |
(projectile-global-mode) | |
(comment-auto-fill) | |
(setq compilation-scroll-output 'first-error) | |
; (setq compile-command "godep go build -v && godep go test -v && godep go vet && godep go install github.com/minio-io/mc") | |
(go-eldoc-setup) | |
(setq gofmt-command "goimports") | |
;; Line number mode | |
;; (linum-mode 1) | |
;; (go-oracle-mode) | |
;; (hlinum-activate) | |
) | |
(add-hook 'go-mode-hook 'go-mode-setup) | |
(add-hook 'before-save-hook 'gofmt-before-save) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment