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: Yuan Fu
Subject: Re: emacs-tree-sitter and Emacs
Date: Thu, 2 Apr 2020 13:18:51 -0400

> I would think that you at least need to parse everything displayed and
> everything before what is displayed.  (You need all prior context.  What
> if someone opened a comment on line 1 and hasn't closed it, for
> example?)  I don't, however, see a reason you couldn't defer sending the
> rest until afterward, any more than you would have to if the file were
> being typed in, one line at a time.

Can we do something similar to fontified text property? I.e., only parse the 
first screen full of text when a buffer is opened, and mark the rest as 
unparsed with text property. Then when we need to access the parse tree (for 
fortification, etc), send all unparsed text before some point (e.g., last 
visible char in the window) to the parser.

Yuan


reply via email to

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