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: Yuan Fu
Subject: Re: Tree-sitter integration on feature/tree-sitter
Date: Thu, 16 Jun 2022 12:03:08 -0700

Hey,

I’ve just finished with Real Life and got back to tree-sitter. I’ll reply to 
individual messages separately, but here is a summary of all the latest changes 
pushed to feature/tree-sitter

- Now one can compile a query, compiled query is much faster than uncompiled 
queries.
- Traversal functions now have a parameter that controls how deep to traverse.
- Removed the ltree-sitter setting in configure.ac
- Consolidated all the parser creation functions into one: 
treesit-parser-create, that means treesit-get-parser and 
treesit-get-parser-create are removed.

I think these are all the pending requests (sans highlight-paren), please let 
me know if I missed anything.

Moving forward, I want to make treesit-parser-list internal and turn it into a 
function that returns the parser list. And add a function to remove a parser 
from the parser list. Because I’m not comfortable letting users to remove and 
re-add parsers into the list anymore. Previously we determined that if a user 
wants to do the wrong thing, so be it. But now I realized that there could be 
danger in crashing Emacs if user fiddle with treesit-parser-list incorrectly 
(and violates some of the assertions I put in).

Can I just add a new Lisp_Object field in struct buffer? I assume that’s how 
you add an internal buffer-local data?

Yuan


reply via email to

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