summary refs log tree commit diff
path: root/emacs.d/custom
diff options
context:
space:
mode:
Diffstat (limited to '')
-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