[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-tree-sitter and Emacs
From: |
Eli Zaretskii |
Subject: |
Re: emacs-tree-sitter and Emacs |
Date: |
Mon, 30 Mar 2020 16:07:35 +0300 |
> From: Jorge Javier Araya Navarro <address@hidden>
> Date: Sun, 29 Mar 2020 21:23:49 -0600
>
> 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? Why not
pass to tree-sitter the chunk that jit-lock is going to fontify?
AFAIU, tree-sitter is well suited for parsing incomplete source
chunks. OTOH, using an after-change hook has its downsides, even if
disregard slow-down (which I wouldn't).