2014년 5월 2일 금요일

emacs + Golang

go-settings.el

(add-to-list 'load-path "~/.emacs.d/go-mode" t)
(require 'go-mode-load)

(add-hook 'go-mode-hook (lambda ()
                          (local-set-key (kbd "C-c C-r") 'go-remove-unused-imports)))
(add-hook 'go-mode-hook (lambda ()
                          (local-set-key (kbd "C-c i") 'go-goto-imports)))
(add-hook 'before-save-hook 'gofmt-before-save)

(add-to-list 'load-path "~/.emacs.d/go-autocomplete" t)
(require 'go-autocomplete)

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(magit-item-highlight ((t nil)) t))

;; go-flymake & go-flycheck
(add-to-list 'load-path "~/.emacs.d/go-flymake")
(require 'go-flymake) 

 

 .emacs 에 추가될 사항

(load "~/.emacs.d/go-settings")

댓글 없음:

댓글 쓰기