* bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably
@ 2023-10-24 14:22 Dominik Honnef
2023-10-24 23:15 ` Dmitry Gutov
0 siblings, 1 reply; 4+ messages in thread
From: Dominik Honnef @ 2023-10-24 14:22 UTC (permalink / raw)
To: 66732
Steps to reproduce:
1. Start emacs -q
2. Clear the scratch buffer
3. Switch to c-ts-mode
4. Type the following:
/* foo
bar
baz
*/
Notice the following:
1. tree-sitter will not parse the buffer contents as a comment until the
closing comment marker is typed (not an issue per se.)
2. When you type the closing comment marker, only that line will be
fontified.
3. Moving to the previous line will refontify the whole comment.
Similarly, removing the closing comment marker will not instantly
refontify the buffer, either.
The expected behavior would be for the whole comment to be refontified
immediately after typing the closing comment marker.
Other buffer contents often lead to even worse refontifying, where even
motion will not fix things.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably
2023-10-24 14:22 bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably Dominik Honnef
@ 2023-10-24 23:15 ` Dmitry Gutov
2023-10-29 12:22 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2023-10-24 23:15 UTC (permalink / raw)
To: Dominik Honnef, 66732
Hi Dominik,
On 24/10/2023 17:22, Dominik Honnef wrote:
> Steps to reproduce:
>
> 1. Start emacs -q
> 2. Clear the scratch buffer
> 3. Switch to c-ts-mode
> 4. Type the following:
>
> /* foo
> bar
> baz
> */
>
> Notice the following:
>
> 1. tree-sitter will not parse the buffer contents as a comment until the
> closing comment marker is typed (not an issue per se.)
>
> 2. When you type the closing comment marker, only that line will be
> fontified.
>
> 3. Moving to the previous line will refontify the whole comment.
>
> Similarly, removing the closing comment marker will not instantly
> refontify the buffer, either.
>
> The expected behavior would be for the whole comment to be refontified
> immediately after typing the closing comment marker.
>
> Other buffer contents often lead to even worse refontifying, where even
> motion will not fix things.
Can repro.
Only with 'emacs -Q', though (note to others who will try).
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably
2023-10-24 23:15 ` Dmitry Gutov
@ 2023-10-29 12:22 ` Eli Zaretskii
2023-11-18 8:37 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-10-29 12:22 UTC (permalink / raw)
To: Dmitry Gutov, Yuan Fu; +Cc: 66732, dominik
> Date: Wed, 25 Oct 2023 02:15:30 +0300
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> Hi Dominik,
>
> On 24/10/2023 17:22, Dominik Honnef wrote:
> > Steps to reproduce:
> >
> > 1. Start emacs -q
> > 2. Clear the scratch buffer
> > 3. Switch to c-ts-mode
> > 4. Type the following:
> >
> > /* foo
> > bar
> > baz
> > */
> >
> > Notice the following:
> >
> > 1. tree-sitter will not parse the buffer contents as a comment until the
> > closing comment marker is typed (not an issue per se.)
> >
> > 2. When you type the closing comment marker, only that line will be
> > fontified.
> >
> > 3. Moving to the previous line will refontify the whole comment.
> >
> > Similarly, removing the closing comment marker will not instantly
> > refontify the buffer, either.
> >
> > The expected behavior would be for the whole comment to be refontified
> > immediately after typing the closing comment marker.
> >
> > Other buffer contents often lead to even worse refontifying, where even
> > motion will not fix things.
>
> Can repro.
>
> Only with 'emacs -Q', though (note to others who will try).
Yuan, any ideas or comments?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably
2023-10-29 12:22 ` Eli Zaretskii
@ 2023-11-18 8:37 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-11-18 8:37 UTC (permalink / raw)
To: casouri; +Cc: dmitry, 66732, dominik
Ping! Yuan, I'd appreciate if you chimed in on this issue.
> Cc: 66732@debbugs.gnu.org, dominik@honnef.co
> Date: Sun, 29 Oct 2023 14:22:30 +0200
> From: Eli Zaretskii <eliz@gnu.org>
>
> > Date: Wed, 25 Oct 2023 02:15:30 +0300
> > From: Dmitry Gutov <dmitry@gutov.dev>
> >
> > Hi Dominik,
> >
> > On 24/10/2023 17:22, Dominik Honnef wrote:
> > > Steps to reproduce:
> > >
> > > 1. Start emacs -q
> > > 2. Clear the scratch buffer
> > > 3. Switch to c-ts-mode
> > > 4. Type the following:
> > >
> > > /* foo
> > > bar
> > > baz
> > > */
> > >
> > > Notice the following:
> > >
> > > 1. tree-sitter will not parse the buffer contents as a comment until the
> > > closing comment marker is typed (not an issue per se.)
> > >
> > > 2. When you type the closing comment marker, only that line will be
> > > fontified.
> > >
> > > 3. Moving to the previous line will refontify the whole comment.
> > >
> > > Similarly, removing the closing comment marker will not instantly
> > > refontify the buffer, either.
> > >
> > > The expected behavior would be for the whole comment to be refontified
> > > immediately after typing the closing comment marker.
> > >
> > > Other buffer contents often lead to even worse refontifying, where even
> > > motion will not fix things.
> >
> > Can repro.
> >
> > Only with 'emacs -Q', though (note to others who will try).
>
> Yuan, any ideas or comments?
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-18 8:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-24 14:22 bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably Dominik Honnef
2023-10-24 23:15 ` Dmitry Gutov
2023-10-29 12:22 ` Eli Zaretskii
2023-11-18 8:37 ` Eli Zaretskii
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).