emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter integration on feature/tree-sitter (severe performance i


From: Stefan Monnier
Subject: Re: Tree-sitter integration on feature/tree-sitter (severe performance issues together with linum-mode)
Date: Tue, 23 Aug 2022 10:30:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> Yeah! I can do that. Do you have some ideas on the syntax you would use for
> font-lock?

Not really, which is why it hasn't happened yet I guess :-)

`syntax-propertize-rules` could be an inspiration (tho, compared to
font-lock, this one had the added constraint that it had to be applied
in a single scan of an N-element regexp whereas font-lock can use
N scans of simpler regexps).

But maybe it's better if you try to come up with your own plan without
suffering from my biases.  Then I can look at it and complain :-)
The result will probably be better.

> If possible I’d like treesit stuff to be similar to font-lock.

Since font-lock's hasn't happened yet, this should presumably happen by
font-lock mimicking treesit rather than the reverse.

> For example I made treesit to use font-lock’s decoration level system.

That is the kind of bias that would have better been avoided (I think
a better approach is to let the major mode specify features that can be
included/excluded: practice seems to have shown that a "level" is too
meaningless and coarse).


        Stefan




reply via email to

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