emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to tell tree-sitter to look for libtree-sitter-go-mod.so instead of


From: Pankaj Jangid
Subject: How to tell tree-sitter to look for libtree-sitter-go-mod.so instead of libtree-sitter-gomod.so?
Date: Tue, 26 Sep 2023 13:28:10 +0530
User-agent: Gnus/5.13 (Gnus v5.13)

I am on emacs-29 branch.

I have following settings for go in the ~/.emacs.d/init.el,

#+begin_src elisp
  (setq treesit-language-source-alist
        '((go . ("https://github.com/tree-sitter/tree-sitter-go.git";))
          (go-mod . ("https://github.com/camdencheek/tree-sitter-gomod.git";))))
  (add-to-list 'auto-mode-alist
               `("\\.go\\'" . go-ts-mode))
  (add-to-list 'auto-mode-alist
               `("\\go.mod\\'" . go-mod-ts-mode))
#+end_src

whenever I load .go or go.mod files, I get this error,

--8<---------------cut here---------------start------------->8---
⛔ Warning (treesit): Cannot activate tree-sitter, because language grammar for 
gomod is unavailable (not-found): (libtree-sitter-gomod libtree-sitter-gomod.0 
libtree-sitter-gomod.0.0 libtree-sitter-gomod.so libtree-sitter-gomod.so.0 
libtree-sitter-gomod.so.0.0) No such file or directory
--8<---------------cut here---------------end--------------->8---

Emacs is looking for libtree-sitter-gomod.so, but in fact the library's
name is libtree-sitter-go-mod.so. Where can I tell tree-sitter to look
for the appropriate file.

Or is this a bug?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]