[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter integration on feature/tree-sitter
From: |
Yoav Marco |
Subject: |
Re: Tree-sitter integration on feature/tree-sitter |
Date: |
Fri, 13 May 2022 11:42:04 +0300 |
User-agent: |
mu4e 1.6.3; emacs 29.0.50 |
Eli Zaretskii <eliz@gnu.org> writes:
> Is it true that there's just one query for each PL mode, and it is
> fixed (doesn't change) and doesn't depend on the buffer contents in
> any way? If that is true, the major mode could compile the query
> whenever it is initialized, and then reuse it in every buffer that is
> under that major mode.
It's correct, though there might be more than one if a mode wants to
offer fontification options users can toggle. But yeah, the major mode
could compile its queries when initialized. I'm in favor of this too.
>> Okay, we can try that. What's the proper way to trigger a "natural
>> fontification" as would occur in the GUI without opening an interactive
>> session?
>
> There isn't any (IIUC what you are asking). Fontification is a
> feature of interactive sessions, and is basically meaningless without
> normal redisplay.
>
>> I'd rather use the groundwork that's actually used by users,
>> and not get stuff like the JIT chunck size wrong. In general I'm not too
>> familiar with that part of Emacs; the benchmarks up to now used
>> with-temp-buffer, would that suffice for these new benchmarks?
>
> Using with-temp-buffer could cause problems, because not everything is
> set up as it would when actually visiting the file. Why is
> with-temp-buffer necessary for the benchmarks?
>
> But if it turns out that a query doesn't depend on the buffer
> contents, I think this is a moot point, and the major mode could
> compile the query just once when its first loaded.
Yeah.
- Yoav
- Re: Tree-sitter integration on feature/tree-sitter, (continued)
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter,
Yoav Marco <=
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, chad, 2022/05/15
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/15
Re: Tree-sitter integration on feature/tree-sitter, Kiong-Ge Liau, 2022/05/19
Re: Tree-sitter integration on feature/tree-sitter, Kiong-Ge Liau, 2022/05/19