[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter integration in python.el
From: |
Stefan Monnier |
Subject: |
Re: Tree-sitter integration in python.el |
Date: |
Wed, 12 Oct 2022 13:52:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> One problem I can see is that the same level could give very different
> busyness across modes. That would defeat the purpose of having a single
> setting. Say mode 1 has (A B C D E F G H I), where ABC are very basic, DEF
> moderate, and GHI fancy, mode 2 has (A B C D E F G), A basic, BCDEF
> moderate, G fancy. Then 80 would give a fancy font-lock in mode 1 and
> a moderate font-lock in mode 2. You get the idea.
Yup. We could be more explicit, then, e.g. use things like ((A B C) (D
E F) (G H I)) for the first and ((A) (B C D E F) (G)) for the second.
> Currently tree-sitter supports both :level and :toggle. When defining
> queries you can say :toggle python-fontify-types, and python-fontify-types
> can control this query. :level would be the global rough settings, :toggle
> would be the local, fine-grained setting. Instead of variables, :toggle
> could be changed to use symbols as you suggested, so it doesn’t create
> a gazillion variables. But WDYT of the general design?
I definitely prefer symbols to variables: this way they can use their
own namespace and don't need the long package prefix and can be
shared/reused between different modes without conflict.
And I would prefer not to include :level in the rules themselves and
instead rely on a separate mapping between features and levels.
Stefan
- Re: Tree-sitter integration in python.el, (continued)
- Re: Tree-sitter integration in python.el, Yuan Fu, 2022/10/07
- Re: Tree-sitter integration in python.el, Eli Zaretskii, 2022/10/08
- Re: Tree-sitter integration in python.el, Yuan Fu, 2022/10/08
- Re: Tree-sitter integration in python.el, Eli Zaretskii, 2022/10/09
- Re: Tree-sitter integration in python.el, Stefan Monnier, 2022/10/11
- Re: Tree-sitter integration in python.el, Yuan Fu, 2022/10/12
- Re: Tree-sitter integration in python.el,
Stefan Monnier <=
- Re: Tree-sitter integration in python.el, Yuan Fu, 2022/10/12
- Re: Tree-sitter integration in python.el, Yuan Fu, 2022/10/12
- Re: [SPAM UNSURE] Re: Tree-sitter integration in python.el, Stephen Leake, 2022/10/12
- Re: Tree-sitter integration in python.el, Eli Zaretskii, 2022/10/13
- Re: Tree-sitter integration in python.el, Yuan Fu, 2022/10/15
- 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