Skip to content

Instantly share code, notes, and snippets.

@shanemhansen
Created May 17, 2012 05:32
Show Gist options
  • Save shanemhansen/2716681 to your computer and use it in GitHub Desktop.
Save shanemhansen/2716681 to your computer and use it in GitHub Desktop.
Go syntax checking
;;optional, but awesome way to install packages like flymake and go-mode on emacs24
;;(require 'package)
;;(add-to-list 'package-archives
;; '("marmalade" . "http://marmalade-repo.org/packages/"))
;;M-x list-packages
;; install flymake, go mode
;;
;; To activate syntax checking in buffer: M-x flymake-mode
(require 'flymake)
(require 'flymake-cursor)
(add-hook 'go-mode-hook
#'(lambda () (setq indent-tabs-mode nil)))
(when (load "flymake" t)
(defun flymake-go-init ()
(list "go" (list "build"))
)
(add-to-list 'flymake-allowed-file-name-masks '("\\.go\\'" flymake-go-init))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment