Improve go usage
This commit is contained in:
parent
d3cd5614b1
commit
af7c179407
3 changed files with 2124 additions and 2 deletions
|
|
@ -26,3 +26,20 @@
|
|||
(add-hook 'ruby-mode-hook
|
||||
(lambda ()
|
||||
(insert-shebang-if-empty "/usr/bin/ruby")))
|
||||
|
||||
; Golang
|
||||
(add-hook 'go-mode-hook
|
||||
(lambda ()
|
||||
(set (make-local-variable 'compile-command) "go build")))
|
||||
|
||||
(add-hook 'go-mode-hook
|
||||
(lambda ()
|
||||
(when (buffer-empty-p)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(insert "package \n\nimport (\n\t\n)\n")))))
|
||||
|
||||
(add-hook 'before-save-hook 'gofmt-before-save)
|
||||
|
||||
(eval-after-load "go-mode"
|
||||
'(require 'flymake-go))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue