GNU bug report logs -
#66153
30.0.50; treesit: Edge case in indentation with multiple languages
Previous Next
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 #13 received at 66153-done <at> debbugs.gnu.org (full text, mbox):
Version: 30.1
Augustin Chéneau (BTuin) <btuin <at> mailo.com> writes:
> 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 point is located on the bracket, it will use
> language_A's rules.
It seems like this patch was installed on master, but the bug was left
open in the bug tracker. I'm therefore closing it now.
Please remember to close bug reports when they are fixed.
commit 7447d3df94e49bef8577008d76a6b1f6a4013146
Author: Augustin Chéneau <btuin <at> mailo.com>
Commit: Yuan Fu <casouri <at> gmail.com>
Date: Wed Sep 20 12:23:22 2023 +0200
Fix tree-sitter indentation conflict with multiple languages
* lisp/treesit.el (treesit--indent-1): Use bol instead of point.
Copyright-paperwork-exempt: yes
This bug report was last modified 1 year and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.