Add support for Go

This commit is contained in:
2014-07-08 22:17:53 +01:00
parent 09100ecbaf
commit f0b3d6ccaf
3 changed files with 31 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
(load-file (get-config-path "mode-customizations/erlang-mode.el"))
(load-file (get-config-path "mode-customizations/feature-mode.el"))
(load-file (get-config-path "mode-customizations/git-commit-mode.el"))
(load-file (get-config-path "mode-customizations/go-mode.el"))
(load-file (get-config-path "mode-customizations/haml-mode.el"))
(load-file (get-config-path "mode-customizations/html-mode.el"))
(load-file (get-config-path "mode-customizations/js-mode.el"))

View File

@@ -0,0 +1,16 @@
(defun customizations-for-go-mode ()
(interactive)
(flyspell-prog-mode)
(flycheck-mode)
(linum-mode t)
(fci-mode)
(auto-complete-mode)
(whitespace-mode)
(subword-mode)
(setq tab-width 4)
(setq highlight-indentation-offset 4)
(highlight-indentation-mode)
(highlight-indentation-current-column-mode))
(add-hook 'go-mode-hook 'customizations-for-go-mode)
(add-hook 'before-save-hook #'gofmt-before-save)

View File

@@ -50,6 +50,10 @@
full-ack
gitconfig-mode
github-browse-file
go-autocomplete
go-mode
go-projectile
go-snippets
grizzl
haml-mode
helm
@@ -171,7 +175,13 @@
(if window-system (ecb-activate)))
;; Load Auto-Complete
(require 'auto-complete)
(when (require 'auto-complete nil 'noerror)
(require 'auto-complete-config)
(ac-config-default)
(ac-flyspell-workaround)
;; load go-autocomplete
(require 'go-autocomplete nil 'noerror))
;; Load browse-kill-ring
(require 'browse-kill-ring)
@@ -198,6 +208,9 @@
;; Load full-ack
(require 'full-ack)
;; load go-projectile
(require 'go-projectile nil 'noerror)
;; Load yasnippet
(when (require 'yasnippet nil 'noerror)
(yas/global-mode t))