summary refs log tree commit diff
path: root/config/init-go.el
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-04-06 11:22:57 -0700
committerFranck Cuny <franck@fcuny.net>2024-04-06 11:22:57 -0700
commit7c5780a719565630f58e7751afa8c7e458c49871 (patch)
treef8863ebcbd4a1e551a63374b3fee589affca1393 /config/init-go.el
parentmove some display stuff (diff)
downloademacs.d-7c5780a719565630f58e7751afa8c7e458c49871.tar.gz
a org file is definitely not the way for me
Diffstat (limited to '')
-rw-r--r--config/init-go.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/config/init-go.el b/config/init-go.el
new file mode 100644
index 0000000..daabb2b
--- /dev/null
+++ b/config/init-go.el
@@ -0,0 +1,28 @@
+;;; init-go.el --- Configure go related things -*- lexical-binding: t -*-
+;; Author: Franck Cuny <franck@fcuny.net>
+
+;;; Commentary:
+
+;; go-mode and friends
+
+;;; Code:
+
+(use-package go-mode
+  :ensure t
+  :defer t
+  :hook ((go-mode . tree-sitter-hl-mode)
+         (go-mode . eglot-ensure)
+         (go-mode . (lambda () (setq tab-width 4)))
+         (go-mode . (lambda () (add-hook 'before-save-hook 'eglot-format-buffer nil t))))
+  :bind (:map go-mode-map
+              ("C-c C-c" . compile)))
+
+(use-package gotest
+  :ensure t
+  :after go-mode
+  :custom
+  (go-test-verbose t))
+
+(provide 'init-go)
+
+;;; init-go.el ends here