summaryrefslogtreecommitdiff
path: root/.config/emacs/config.org
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/config.org')
-rw-r--r--.config/emacs/config.org8
1 files changed, 7 insertions, 1 deletions
diff --git a/.config/emacs/config.org b/.config/emacs/config.org
index a06f592..4c39ec3 100644
--- a/.config/emacs/config.org
+++ b/.config/emacs/config.org
@@ -763,6 +763,7 @@ already installed unfortunately, but it’s easy enough to do manually.
(css "https://github.com/tree-sitter/tree-sitter-css")
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
(go "https://github.com/tree-sitter/tree-sitter-go")
+ (go-mod "https://github.com/camdencheek/tree-sitter-go-mod.git")
(html "https://github.com/tree-sitter/tree-sitter-html")
(json "https://github.com/tree-sitter/tree-sitter-json")
(make "https://github.com/alemuller/tree-sitter-make")
@@ -771,6 +772,9 @@ already installed unfortunately, but it’s easy enough to do manually.
(toml "https://github.com/tree-sitter/tree-sitter-toml")
(yaml "https://github.com/ikatyang/tree-sitter-yaml")))
+ (setq treesit-load-name-override-list
+ '((go-mod "libtree-sitter-go-mod" "tree_sitter_gomod")))
+
;; Automatically install missing grammars
(thread-last
(mapcar #'car treesit-language-source-alist)
@@ -1160,10 +1164,12 @@ file with a certain file extension.
#+BEGIN_SRC elisp
+ (require 'go-ts-mode)
(require 'rust-ts-mode)
(require 'yaml-ts-mode)
- (dolist (pair '(("\\.py\\'" . python-ts-mode)
+ (dolist (pair '(("\\.go\\'" . go-ts-mode)
+ ("\\.py\\'" . python-ts-mode)
("\\.rs\\'" . rust-ts-mode)
("\\.ya?ml\\'" . yaml-ts-mode)))
(add-to-list 'auto-mode-alist pair))