[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reliable after-change-functions (via: Using incremental parsing in E
From: |
Eli Zaretskii |
Subject: |
Re: Reliable after-change-functions (via: Using incremental parsing in Emacs) |
Date: |
Tue, 31 Mar 2020 05:24:10 +0300 |
> From: Yuan Fu <address@hidden>
> Date: Mon, 30 Mar 2020 13:14:02 -0400
> Cc: Eli Zaretskii <address@hidden>, address@hidden,
> Andrea Corallo <address@hidden>
>
> Why not simply pass to tree-sitter the chunk that jit-lock is about to
> fontify?
>
> Incremental parsing seems to be the preferred way to use
> tree-sitter—maintaining a syntax tree on the fly
> and later query for information from it.
I don't see how this contradicts my proposal of passing just the chunk
that we need to fontify. The function that actually passes the
portion of the buffer to tree-sitter can always extend the chunk in
both direction to make it easier, like make sure it's a complete code
block or something.
IOW, our goal is not to build the syntax tree, it's to give
tree-sitter enough information to allow us to fontify the part that's
about to be displayed. We need to have tree-sitter play by Emacs
rules, not teach Emacs to play by tree-sitter rules.
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), (continued)
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Štěpán Němec, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Štěpán Němec, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Štěpán Němec, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stephen Leake, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Štěpán Němec, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs),
Eli Zaretskii <=
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Dmitry Gutov, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Dmitry Gutov, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/03/31