]> git.eshelyaron.com Git - emacs.git/commitdiff
treesit-major-mode-setup: Use 'treesit--syntax-propertize-notifier'
authorDmitry Gutov <dmitry@gutov.dev>
Sun, 24 Dec 2023 02:07:15 +0000 (04:07 +0200)
committerDmitry Gutov <dmitry@gutov.dev>
Sun, 24 Dec 2023 02:07:15 +0000 (04:07 +0200)
* lisp/treesit.el (treesit-major-mode-setup): Make sure
'treesit--syntax-propertize-notifier' is used (bug#66732)

lisp/treesit.el

index 2ef4e382cf3870adb63a2c449bf76298d7765ce6..eed53bc2b99ae2ad96996706292306f7ce496564 100644 (file)
@@ -2461,6 +2461,9 @@ before calling this function."
        parser #'treesit--font-lock-notifier))
     (add-hook 'pre-redisplay-functions #'treesit--pre-redisplay 0 t))
   ;; Syntax
+  (dolist (parser (treesit-parser-list))
+    (treesit-parser-add-notifier
+     parser #'treesit--syntax-propertize-notifier))
   (add-hook 'syntax-propertize-extend-region-functions
             #'treesit--pre-syntax-ppss 0 t)
   ;; Indent.