emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs-tree-sitter and Emacs


From: Stephen Leake
Subject: Re: emacs-tree-sitter and Emacs
Date: Tue, 31 Mar 2020 16:08:45 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt)

Stefan Monnier <address@hidden> writes:

>>> I have gone through th0rex's pull request[2] and nothing suggests that
>>> hooks are being used in order to do
>>> the fontification of buffers, the only hook we have is
>>> `tree-sitter--after-change', it does re-parsing and keeps
>>> the tree updated
>>
>> Can you explain why an after-change hook is at all needed?
>
> IIUC `tree-sitter--after-change` is not a function placed on
> `after-change-function` but a hook which tree-sitter runs after its
> parse tree has been changed.  The "tree-sitter-highlight" feature uses
> this hook to be informed which parts of the buffer need to be
> re-fontified after a change (which can be much more than just the part
> of the buffer that was changed).

But presumably the parse is triggered by a function on
after-change-functions.

-- 
-- Stephe



reply via email to

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