Yuan Fu writes: >> On Nov 24, 2022, at 9:20 PM, T.V Raman wrote: >> >> I installed from elpa/melpa: >> >> ls -1 -d tree-sitter-* >> tree-sitter-20220212.1632/ >> tree-sitter-langs-20221122.645/ >> 21:18:06 elpa $ >> >> but emacs compiled from latest Git Head still produces the >> completely >> unhelpful message >> tree-support for language is unavailable if I invoke c-ts-mode >> or >> c++-ts-mode >> >> A note in the News file detailing what bits one needs to install >> might >> be the shoes we need to help us walk the final mile on this long >> road >> to tree-sitter integration. > > We are just starting to work on tree-sitter’s user-facing > documentation, including the (emacs) manual and NEWS file. I’ll > definitely improve the error message. In the meantime, find files > that > looks like libtree-sitter-xxx.so and put them under > ~/.emacs.d/tree-sitter (or a standard library location like > /usr/local/lib), and Emacs should be able to find them. > > Yuan Hi Yuan! I have a question. Are these paths hardcoded? I use MacOS, I've built a grammar for java using custom homebrew formula, it produces the file /opt/homebrew/lib/libtree-sitter-java.dylib, but when I open any java source file and try to activate java-ts-mode, I'm getting the error: Warning (treesit): Cannot activate tree-sitter, because language definition for java is unavailable (not-found): (libtree-sitter-java.so libtree-sitter-java.dylib) No such file or directory I can fix it by adding /opt/homebrew/lib to treesit-extra-load-path, but I'm wondering how to install grammar properly to avoid setting this variable. -- Best regards, Roman