emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter integration in python.el


From: Augusto Stoffel
Subject: Re: Tree-sitter integration in python.el
Date: Mon, 10 Oct 2022 17:53:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Mon, 10 Oct 2022 at 08:10, Yuan Fu wrote:

> I’ve added support for :level in treesit-font-lock-rules, yes ;-)

Nice, thanks.

Now, concerning font-lock-ignore: why do you say you think something
like it is not needed in tree-sitter?  Do you see no need for a
fine-grained customization option for font lock, or do you have a better
implementation of fine-grained customization in mind?

I'd say a fine-grained customization option is very much needed.
Requiring the user to advice `treesit-font-lock-rules' is to high of a
bar.  `font-lock-ignore' may not be incredibly easy to use (the user
still has to look at the font-lock rule definitions), but it's flexible,
has a simple implementation, and imposes no extra work on the major-mode
developer.

You can probably just stick a call to font-lock--filter-keywords
somewhere in treesit.el and call it a day.



reply via email to

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