GNU bug report logs - #66153
30.0.50; treesit: Edge case in indentation with multiple languages

Previous Next

Package: emacs;

Reported by: Augustin Chéneau (BTuin) <btuin <at> mailo.com>

Date: Fri, 22 Sep 2023 11:28:01 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 66153 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Augustin Chéneau (BTuin) <btuin <at> mailo.com>,
 66153 <at> debbugs.gnu.org
Subject: Re: bug#66153: 30.0.50; treesit: Edge case in indentation with
 multiple languages
Date: Fri, 22 Sep 2023 15:18:00 +0300
On 22/09/2023 14:27, Augustin Chéneau (BTuin) wrote:
> 
> There is an edge case in treesit with multiple languages
> indentation. Here is a simple example:
> 
> // language_A
>      {
>         // language_B
>      }
> // language_A
> 
> 
> Here, brackets are managed by language_A, but everything inside is
> managed by language_B.  Meaning that if the pointer is at the beginning
> of the third line (with the closing bracket), it will use language_B's
> indent rules.  But if the

The patch looks reasonable to me (we do something similar in mmm-mode).




This bug report was last modified 1 year and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.