From cb3eef4d198a5b38481f1b114e227539240e291c Mon Sep 17 00:00:00 2001 From: JSDurand Date: Fri, 21 Jan 2022 18:20:34 +0800 Subject: go-conf: configure go-mode --- init.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'init.el') diff --git a/init.el b/init.el index d02b525..bfa603c 100644 --- a/init.el +++ b/init.el @@ -356,6 +356,21 @@ no effect." (define-key global-map (vector ?\C-\s-r) #'rotate-frame-clockwise) (define-key global-map (vector ?\C-\s-t) #'transpose-frame)) +;;; Go-mode + +(load-after-function + go-mode "go-conf.el" + "Load Go-mode configurations and lauch it." nil + (go-mode)) + +(cond + ((assoc "\\.go$" auto-mode-alist #'string=) + (setcdr + (assoc "\\.go$" auto-mode-alist #'string=) + #'go-mode)) + ((add-to-list 'auto-mode-alist + (cons "\\.go$" #'go-mode)))) + ;;; server ;; (cond @@ -365,5 +380,4 @@ no effect." (setq gc-cons-threshold (* 2 1024 1024)) (provide 'init) - ;;; init.el ends here -- cgit v1.2.3-18-g5258