emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter api


From: Stefan Monnier
Subject: Re: Tree-sitter api
Date: Sat, 07 Aug 2021 11:47:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> We should have a user option to control tree-sitter on major mode
> level. Maybe an alist where each car is a major node symbol and each cdr is
> a Boolean value toggling tree-sitter for that node.

The more traditional approach is to use a buffer-local var set by the
major mode or set via (add-hook '<MODE>-hook ...).

> As for indentation, we could provide some infrastructure like we do for
> font-locking, or we can just let major modes implement their indent function
> with tree-sitter api.

We should definitely provide the infrastructure (even if it's fairly
simple) so that major modes only have to provide some rules.


        Stefan




reply via email to

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