GNU bug report logs -
#73376
Treesitter does not rescan after indentation
Previous Next
Full log
Message #11 received at 73376 <at> debbugs.gnu.org (full text, mbox):
> On Sep 20, 2024, at 9:20 PM, Yuan Fu <casouri <at> gmail.com> wrote:
>
>
>
>> On Sep 20, 2024, at 12:00 AM, pranshu sharma <pranshusharma366 <at> gmail.com> wrote:
>>
>>
>> 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.
>>
>
> Hi Pranshu,
>
> Thanks for the report. I can reproduce it. Let me see what’s going on here.
>
> Yuan
Seems to be a tree-sitter or tree-sitter-haskell bug, reported here: https://github.com/tree-sitter/tree-sitter-haskell/issues/129
Yuan
This bug report was last modified 27 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.