bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66732: tree-sitter fontification doesn't update multi-line syntax re


From: Dmitry Gutov
Subject: bug#66732: tree-sitter fontification doesn't update multi-line syntax reliably
Date: Sun, 17 Dec 2023 20:32:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 17/12/2023 03:16, Yuan Fu wrote:
+(defun treesit--pre-syntax-ppss (&rest _)
+  "Force reparse and consequently run all notifiers.
+
+Similar to font-lock, we want to update the `syntax' text
+property before `syntax-ppss' starts working on the text."
+  (treesit--pre-redisplay)
+  nil)

This callback might be the best place to inform syntax-propertize about the extended bounds which need to be re-parsed, so I'm not sure about Stefan's suggestion to return nil here.

Even calling syntax-ppss-flush-cache wouldn't be a full solution, because that wouldn't update the value of START in syntax-propertize.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]