[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Initial fontification in sh-mode with tree-sittter
From: |
Yuan Fu |
Subject: |
Re: Initial fontification in sh-mode with tree-sittter |
Date: |
Thu, 3 Nov 2022 00:16:11 -0700 |
> On Nov 2, 2022, at 11:36 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Wed, 2 Nov 2022 18:25:13 -0700
>> Cc: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>,
>> emacs-devel@gnu.org
>>
>> What I ended up doing is to set jit-lock-context-unfontify-pos to the
>> beginning of the string node (aka beginning of region A). Then in a timer
>> jit-lock-context will refontify everything after that position. And I have
>> some measure to break possible infinite recursion (fontify region -> set
>> jit-lock-context-unfontify-pos -> cause refontification -> fontify region ->
>> …).
>
> OK, but beware of the case where region A is very large. Could
> performance suffer in such cases?
That’s no problem, region A is still jit-locked, it’s only refortified when
displayed.
Yuan
- Re: Initial fontification in sh-mode with tree-sittter, Eli Zaretskii, 2022/11/01
- Re: Initial fontification in sh-mode with tree-sittter, Yuan Fu, 2022/11/01
- Re: Initial fontification in sh-mode with tree-sittter, Eli Zaretskii, 2022/11/01
- Re: Initial fontification in sh-mode with tree-sittter, João Paulo Labegalini de Carvalho, 2022/11/03
- Re: Initial fontification in sh-mode with tree-sittter, Yuan Fu, 2022/11/03
- Re: Initial fontification in sh-mode with tree-sittter, João Paulo Labegalini de Carvalho, 2022/11/04
- Re: Initial fontification in sh-mode with tree-sittter, Yuan Fu, 2022/11/04
- Re: Initial fontification in sh-mode with tree-sittter, João Paulo Labegalini de Carvalho, 2022/11/12
- Re: Initial fontification in sh-mode with tree-sittter, Yuan Fu, 2022/11/12
- Re: Initial fontification in sh-mode with tree-sittter, João Paulo Labegalini de Carvalho, 2022/11/12
- Re: Initial fontification in sh-mode with tree-sittter, Yuan Fu, 2022/11/16
- Re: Initial fontification in sh-mode with tree-sittter, João Paulo Labegalini de Carvalho, 2022/11/16
- Re: Initial fontification in sh-mode with tree-sittter, Yuan Fu, 2022/11/17