[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter integration in python.el
From: |
Yuan Fu |
Subject: |
Re: Tree-sitter integration in python.el |
Date: |
Tue, 11 Oct 2022 22:08:52 -0700 |
>
> 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.
Currently we have :toggle variable, which let variable control whether to
enable a query. Major modes could sever font-lock into categories, each
controlled by a variable. Eg, python-font-lock-type,
python-font-lock-assignment, etc. I think that should be more than enough as
long as developers bother to create these toggles.
Yuan
- Re: [SPAM UNSURE] Re: Tree-sitter integration in python.el, (continued)
- Re: Tree-sitter integration in python.el, Augusto Stoffel, 2022/10/08
- RE: [External] : Re: Tree-sitter integration in python.el, Drew Adams, 2022/10/08
- Re: [External] : Re: Tree-sitter integration in python.el, Augusto Stoffel, 2022/10/10
- Re: Tree-sitter integration in python.el, Yuan Fu, 2022/10/08
- Re: Tree-sitter integration in python.el, Augusto Stoffel, 2022/10/10
- Re: Tree-sitter integration in python.el, Yuan Fu, 2022/10/10
- Re: Tree-sitter integration in python.el, Augusto Stoffel, 2022/10/10
- Re: Tree-sitter integration in python.el,
Yuan Fu <=
- Re: Tree-sitter integration in python.el, Stefan Monnier, 2022/10/11
- Re: Tree-sitter integration in python.el, Eli Zaretskii, 2022/10/04
- Re: Tree-sitter integration in python.el, Matthias Meulien, 2022/10/04
- Re: Tree-sitter integration in python.el, Eli Zaretskii, 2022/10/04
- Re: Tree-sitter integration in python.el, Matthias Meulien, 2022/10/04
Re: Tree-sitter integration in python.el, Yuan Fu, 2022/10/03
Re: Tree-sitter integration in python.el, address@hidden, 2022/10/03