summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck.cuny@gmail.com>2020-05-10 14:20:10 -0700
committerFranck Cuny <franck.cuny@gmail.com>2020-05-10 14:20:10 -0700
commit70e4c824e704dfc3060ed0576dc740351680f5ef (patch)
tree6af023c02e3be8a96617b5a51ed9075d9692d011
parentemacs: flycheck stuff (diff)
downloademacs.d-70e4c824e704dfc3060ed0576dc740351680f5ef.tar.gz
emacs: stuff for go
-rw-r--r--emacs.d/custom/fcuny-prog.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/emacs.d/custom/fcuny-prog.el b/emacs.d/custom/fcuny-prog.el
index 481995b..64ba181 100644
--- a/emacs.d/custom/fcuny-prog.el
+++ b/emacs.d/custom/fcuny-prog.el
@@ -1,5 +1,12 @@
 (require 'fcuny-vars)
 
+(use-package auto-fill
+  :hook (prog-mode . auto-fill-mode)
+  :custom
+  ;; this does not seem to work ..
+  (comment-fill-column 80)
+  (comment-auto-fill-only-comments t))
+
 (use-package company
   :ensure t
   :diminish company-mode
@@ -96,20 +103,15 @@
   :config
   (add-hook 'makefile-mode-hook (lambda () (setq-local tab-width 2))))
 
-(defun fcuny/go-mode-setup ()
-  (setq tab-width 4)
-  (setq comment-auto-fill-only-comments t)
-  (setq fill-column 80)
-  (auto-fill-mode 1))
-
 (use-package go-mode
   :ensure t
-  :hook ((go-mode . fcuny/go-mode-setup)
-         (before-save . lsp-format-buffer)
+  :hook ((before-save . lsp-format-buffer)
          (before-save . lsp-organize-imports))
   :config
   (when (memq window-system '(mac ns))
-    (exec-path-from-shell-copy-env "GOPATH")))
+    (exec-path-from-shell-copy-env "GOPATH"))
+  :custom
+  (tab-width 4))
 
 (use-package gotest
   :ensure t