From 1ffcdc6e5045b7e991f4f21acc353e4369330c8a Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Fri, 8 Mar 2024 19:54:16 -0800 Subject: [PATCH] Add go-mode stuff --- init.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/init.el b/init.el index 8ad6378..32cec37 100644 --- a/init.el +++ b/init.el @@ -127,6 +127,7 @@ (yaml "https://github.com/ikatyang/tree-sitter-yaml") (css "https://github.com/tree-sitter/tree-sitter-css") (go "https://github.com/tree-sitter/tree-sitter-go") + (gomod "https://github.com/camdencheek/tree-sitter-go-mod") (js "https://github.com/tree-sitter/tree-sitter-javascript") (bash "https://github.com/tree-sitter/tree-sitter-bash") (cmake "https://github.com/uyha/tree-sitter-cmake") @@ -765,6 +766,16 @@ COMMAND and COMINT are like `compile'." :innermodes '(my/poly-php-innermode)) (add-to-list 'auto-mode-alist '("\\.php\\|\\.phtml\\'" . my/poly-web-mode))) +;; go mode +(use-package go-mode) +(use-package go-ts-mode + :ensure nil + :hook ((go-ts-mode . eglot-ensure) + (go-ts-mode . my/-setup-go-ts-mode)) + :init + (defun my/-setup-go-ts-mode () + (setq-local indent-line-function #'go-mode-indent-line))) + ;; rust (use-package rust-mode) (use-package rust-ts-mode