[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using incremental parsing in Emacs
From: |
Dmitry Gutov |
Subject: |
Re: Using incremental parsing in Emacs |
Date: |
Sat, 4 Jan 2020 16:42:38 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 04.01.2020 15:30, arthur miller wrote:
Do it in a thread and display file originally without syntax coloring,
and then gradually display results as the tree-sitter thread work it's
way?
Syntax info is needed not only for coloring, and often on-demand. So a
synchronous API will be needed.
Maybe start with displayed portion of the file only. Then since
tree-sitter accepts changes as fine-grained as on character level, send
new lines for syntax colouring as they are scrolled upp or down.
Like Eli said, see how JIT-lock works. If tree-sitter can support this
usage, very good.
Or other strategy could be to have tree-sitter thread highlight the
visible portion of the file and to continue to work with non-visible
part of the buffer in background?
That seems kinda wasteful.
- Re: Using incremental parsing in Emacs, (continued)
- Re: Replacing all C code????, Stefan Monnier, 2020/01/05
- Re: Replacing all C code????, Fangrui Song, 2020/01/05
- Re: Replacing all C code????, Richard Stallman, 2020/01/05
- Re: Replacing all C code????, Stefan Monnier, 2020/01/05
- Re: Replacing all C code????, VanL, 2020/01/06
- Re: Using incremental parsing in Emacs, arthur miller, 2020/01/04
- Re: Using incremental parsing in Emacs,
Dmitry Gutov <=
Re: Using incremental parsing in Emacs, arthur miller, 2020/01/04