summaryrefslogtreecommitdiff
path: root/modules/prog-go.el
diff options
context:
space:
mode:
Diffstat (limited to 'modules/prog-go.el')
-rw-r--r--modules/prog-go.el52
1 files changed, 4 insertions, 48 deletions
diff --git a/modules/prog-go.el b/modules/prog-go.el
index 617fceaa..70e1f832 100644
--- a/modules/prog-go.el
+++ b/modules/prog-go.el
@@ -5,6 +5,8 @@
;;; Code:
+;; ---------------------------------- Go Setup ---------------------------------
+;; golang preferences
(defun cj/go-setup ()
"My default code preferences for Golang."
@@ -20,7 +22,8 @@
(electric-pair-mode t)) ;; match delimiters automatically
(add-hook 'go-mode-hook 'cj/go-setup)
-;;;; ---------------------------- Go Mode ----------------------------
+;; ---------------------------------- Go Mode ----------------------------------
+;; go mode configuration
(use-package go-mode
:bind (:map go-mode-map
@@ -34,52 +37,5 @@
;; go install golang.org/x/tools/cmd/goimports@latest
(setq gofmt-command "goimports"))
-;; (use-package go-mode
-;; :config
-;; (general-define-key
-;; :keymaps 'go-mode-map
-;; :states '(normal)
-;; "K" #'godoc-at-point
-;; "C-]" #'godef-jump)
-
-;; (general-define-key
-;; :keymaps 'go-mode-map
-;; :states '(normal)
-;; :prefix mpereira/leader
-;; "tt" #'go-test-current-test
-;; "tT" #'go-test-current-file
-;; "pt" #'go-test-current-project))
-
-;; ------------- Configure Emacs To Find Go Project Root -------------
-
-;; Note: This appears to interfere with tramp. Before re-enabling, this
-;; should have a toggle and turned off when working in tramp.
-
-;; (require 'project)
-
-;; (defun project-find-go-module (dir)
-;; (when-let ((root (locate-dominating-file dir "go.mod")))
-;; (cons 'go-module root)))
-
-;; (cl-defmethod project-root ((project (head go-module)))
-;; (cdr project))
-
-;; (add-hook 'project-find-functions #'project-find-go-module)
-
-;; -------------------- Enable Eglot Integrations --------------------
-
-;; The depth of -10 places this before eglot's willSave notification,
-;; so that that notification reports the actual contents that will be saved.
-;; (defun eglot-format-buffer-on-save ()
-;; (add-hook 'before-save-hook #'eglot-format-buffer -10 t))
-;; (add-hook 'go-mode-hook #'eglot-format-buffer-on-save)
-
-;; -------------------- Configure Gopls Via Eglot --------------------
-
-;; (setq-default eglot-workspace-configuration
-;; '((:gopls .
-;; ((staticcheck . t)
-;; (matcher . "CaseSensitive")))))
-
(provide 'prog-go)
;;; prog-go.el ends here