about summary refs log tree commit diff
path: root/emacs/.emacs.d
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-01-31T23·15+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-31T23·18+0000
commite8b47d5030801c0249a8e9741df3ead0b0d374de (patch)
treedee7cbe205c2c105fcdcbfe920fb456333b9fef8 /emacs/.emacs.d
parent184404d5421bd052519f757450d8dbd9466a6e14 (diff)
Support golang
I decided to start writing go code for scripts instead of python. I think this
will be a learning opportunity for me and should increase the integrity of my
scripts by adding some static type checking.
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r--emacs/.emacs.d/init.el1
-rw-r--r--emacs/.emacs.d/wpc/wpc-golang.el23
2 files changed, 24 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 0351eceddeec..226e6ae2a644 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -59,3 +59,4 @@
 (require 'wpc-javascript)
 (require 'wpc-java)
 (require 'wpc-prolog)
+(require 'wpc-golang)
diff --git a/emacs/.emacs.d/wpc/wpc-golang.el b/emacs/.emacs.d/wpc/wpc-golang.el
new file mode 100644
index 000000000000..41d6cb50ec84
--- /dev/null
+++ b/emacs/.emacs.d/wpc/wpc-golang.el
@@ -0,0 +1,23 @@
+;;; wpc-ocaml.el --- Tooling preferences for Go -*- lexical-binding: t -*-
+;; Author: William Carroll <wpcarro@gmail.com>
+
+;;; Commentary:
+;; Tooling support for golang development.
+
+;;; Code:
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Configuration
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; I'm unsure if this belongs in wpc-golang.el because it's a generic setting,
+;; but because go is the first languages I've encountered that enforces tab
+;; usage (I think) I'm configuring it.
+(setq-default tab-width 4)
+
+(use-package go-mode
+  :config
+  (add-hook-before-save 'go-mode-hook #'gofmt-before-save))
+
+(provide 'wpc-golang)
+;;; wpc-ocaml.el ends here