From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Fu Yuan <casouri@gmail.com>
Cc: jostein@kjonigsen.net,
"Ergus via Emacs development discussions." <emacs-devel@gnu.org>,
"Tuấn-Anh Nguyễn" <ubolonton@gmail.com>,
"Markus Triska" <markus.triska@gmx.at>,
"Theodor Thornhill" <theo@thornhill.no>,
dgutov@yandex.ru
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 [thread overview]
Message-ID: <jwv1qt79h1t.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <04E35325-9A74-4395-9C93-2300827494C4@gmail.com> (Fu Yuan's message of "Mon, 22 Aug 2022 18:53:10 -0700")
> 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
next prev parent reply other threads:[~2022-08-23 14:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 12:32 Tree-sitter integration on feature/tree-sitter (severe performance issues together with linum-mode) Jostein Kjønigsen
2022-08-15 12:50 ` Dmitry Gutov
2022-08-15 13:53 ` Stefan Monnier
2022-08-18 7:50 ` Yuan Fu
2022-08-18 9:44 ` Yuan Fu
2022-08-19 6:01 ` Jostein Kjønigsen
2022-08-19 21:58 ` Yuan Fu
2022-08-20 14:14 ` Stefan Monnier
2022-08-23 1:53 ` Fu Yuan
2022-08-23 14:30 ` Stefan Monnier [this message]
2022-08-24 1:18 ` John Yates
2022-09-06 2:53 ` Clément Pit-Claudel
2022-09-06 4:44 ` Macros considered harmful (was: Tree-sitter integration on feature/tree-sitter (severe performance issues together with linum-mode)) Stefan Monnier
2022-09-06 15:33 ` Macros considered harmful Basil L. Contovounesios
2022-09-06 16:01 ` Stefan Monnier
2022-11-03 18:27 ` Basil L. Contovounesios
2022-09-06 16:13 ` Philip Kaludercic
2022-09-06 16:54 ` T.V Raman
2022-09-07 0:41 ` Tree-sitter integration on feature/tree-sitter (severe performance issues together with linum-mode) Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv1qt79h1t.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=casouri@gmail.com \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=jostein@kjonigsen.net \
--cc=markus.triska@gmx.at \
--cc=theo@thornhill.no \
--cc=ubolonton@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).