[Top][All Lists]

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

Re: How to add pseudo vector types

From: Yuan Fu
Subject: Re: How to add pseudo vector types
Date: Fri, 23 Jul 2021 10:45:22 -0400

> On Jul 23, 2021, at 10:07 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> But that's how the current font-lock and indentation work: they never
>> look beyond the narrowing limits.
> Not quite: that's true for indentation, but for font-lock we have
> `font-lock-dont-widen` (i.e. by default, font-lock widens temporarily
> while it does its job).
> For TS, given the cost associated with changing the bounds, I think it
> would make a lot of sense to ignore narrowing (and maybe provide some
> separate way to specify bounds, for the rare cases like Info and Rmail
> where a buffer contains "a collection of things" and we only want to
> parse/manipulate one of those things at any given time).

Tree-sitter lets you set ranges in which the parser works in. That’s how they 
support multi-language files like html+javascript+css. This will certainly work 
for Rmail and Info, too.


reply via email to

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