mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Add support for Go
This commit is contained in:
@@ -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"))
|
||||
|
||||
16
mode-customizations/go-mode.el
Normal file
16
mode-customizations/go-mode.el
Normal 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)
|
||||
15
packages.el
15
packages.el
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user