Subject: bug#73376: closed (Re: bug#73376: Treesitter does not rescan after indentation)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 26 May 2025 22:48:02 +0000

Your bug report

#73376: Treesitter does not rescan after indentation

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
73376: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73376
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#73376: Treesitter does not rescan after indentation
From: Yuan Fu <[email-masked]>
To: Pranshu <[email-masked]>
Cc: [email-masked]
Date: Mon, 26 May 2025 15:47:08 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

> On May 25, 2025, at 10:57 PM, Pranshu <[email-masked]> wrote:
> 
> It's fixed now, thanks!

Great! Closing.

Yuan

Subject: Treesitter does not rescan after indentation
From: pranshu sharma <[email-masked]>
To: [email-masked]
Date: Fri, 20 Sep 2024 17:00:39 +1000
List-Id: <debbugs-submit.debbugs.gnu.org>

After indenting, treesitter does not rescan the region.  This causes
errors in the concrete syntax tree, which mess up indentation and syntax
colouring.

The issue I'm having is kind of hard to explain, but in a summary I have
the poorly indented code, where what's between '_'(which is not in the
code itself) is coloured:
---------------
f x =
               let _a_ = 2
                   _c_ = 1
  in a
--------------
Then when I indent it with haskell-ts-mode, I get:
---------------
f x =
  let _a_ = 2
      c = 1
  in a
--------------
When the 2 snippets of code have the exact same meaning.  If I revert
the buffer then the 'c' becomes coloured again.

This is not just problem with syntax highlighting, but if I was to
indent the 2nd snippet it would mess it up, as it has the wrong CST.