emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter integration on feature/tree-sitter


From: Daniel Martín
Subject: Re: Tree-sitter integration on feature/tree-sitter
Date: Sat, 14 May 2022 17:09:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin)

Yuan Fu <casouri@gmail.com> writes:

> Guys,
>
> I’ve pushed the tree-sitter integration to feature/tree-sitter. If anyone 
> want to give it a try:
> - get tree-sitter from GitHub (or your package manager, make sure the version 
> is at least 0.20.2)
> https://github.com/tree-sitter/tree-sitter
> - pull and build the branch
> - read (elisp)Parsing Program Source
> - grab language definitions from https://github.com/casouri/tree-sitter-module
> You can either build with my script, or download the prebuilt ones
> - play with it
>
> Also apologize in advance for that my response might be slow until like June 
> :-)
>
> Yuan

Thanks for working on this.  What is the best way to report
problems/contribute patches?  I've tried to build the branch and got a
"file not found" error when including <tree_sitter/api.h> (I have
tree-sitter correctly installed via Homebrew on macOS).  I've fixed the
problem with the following patch:

diff --git a/configure.ac b/configure.ac
index bf97dd017c..5a82d47db3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3115,7 +3115,6 @@ AC_DEFUN
     [HAVE_TREE_SITTER=yes], [HAVE_TREE_SITTER=no])
   if test "${HAVE_TREE_SITTER}" = yes; then
     AC_DEFINE(HAVE_TREE_SITTER, 1, [Define if using tree-sitter.])
-    TREE_SITTER_LIBS=-ltree-sitter
     TREE_SITTER_OBJ="treesit.o"
   fi
 fi
diff --git a/src/Makefile.in b/src/Makefile.in
index a21af42c0b..7533f25963 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -344,7 +344,7 @@ JSON_CFLAGS =
 JSON_OBJ = @JSON_OBJ@
 
 TREE_SITTER_LIBS = @TREE_SITTER_LIBS@
-TREE_SITTER_FLAGS = @TREE_SITTER_FLAGS@
+TREE_SITTER_CFLAGS = @TREE_SITTER_CFLAGS@
 TREE_SITTER_OBJ = @TREE_SITTER_OBJ@
 
 INTERVALS_H = dispextern.h intervals.h composite.h

I have already signed the FSF paperwork.  Thanks.


reply via email to

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