From: pranshu sharma <pranshusharma366@gmail.com>
To: 73376@debbugs.gnu.org
Subject: bug#73376: Treesitter does not rescan after indentation
Date: Fri, 20 Sep 2024 17:00:39 +1000 [thread overview]
Message-ID: <8734lustbc.fsf@gmail.com> (raw)
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.
next reply other threads:[~2024-09-20 7:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 7:00 pranshu sharma [this message]
2024-09-21 4:20 ` bug#73376: Treesitter does not rescan after indentation Yuan Fu
2024-09-22 6:35 ` Yuan Fu
2024-09-23 13:08 ` pranshu sharma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734lustbc.fsf@gmail.com \
--to=pranshusharma366@gmail.com \
--cc=73376@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.