emacs-devel
[Top][All Lists]
Advanced

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

Re: master 09b5f00613: ; Fix calls to treesit functions


From: Eli Zaretskii
Subject: Re: master 09b5f00613: ; Fix calls to treesit functions
Date: Tue, 20 Dec 2022 05:39:05 +0200

> From: Yuan Fu <casouri@gmail.com>
> Date: Mon, 19 Dec 2022 16:12:31 -0800
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
>  emacs-devel@gnu.org,
>  Eli Zaretskii <eliz@gnu.org>
> 
> 
> I expect the vast majority uses of tree-sitter involves calling 
> treesit-node-at (or treesit-node-on) to get a node, so that seems like a good 
> place to add a check. And I’ll make them use (treesit-language-at (point)) by 
> default, so that eliminates the need for checking for a particular language. 
> In addition we can make treesit-parser-list work regardless of whether 
> tree-sitter is built with Emacs. How does that sound?

SGTM, but I think we should document somewhere how does one write a
Lisp program that could optionally use tree-sitter, i.e. which APIs
text for the availability of tree-sitter support internally, and thus
could serve as a gate-keepers.



reply via email to

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