aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuan Fu2022-10-30 20:53:44 -0700
committerYuan Fu2022-10-30 20:53:44 -0700
commit52c8fdde1667ac4b5d7f2af5eff94d6512d83caa (patch)
tree97aee338c4201e1da929025eb82b6e019e5cff95
parent8c385f05120bdf905a027fe99eab23a59d0f837e (diff)
downloademacs-52c8fdde1667ac4b5d7f2af5eff94d6512d83caa.tar.gz
emacs-52c8fdde1667ac4b5d7f2af5eff94d6512d83caa.zip
Set jit-lock-contextually in treesit-major-mode-setup
* lisp/treesit.el (treesit-major-mode-setup): Set jit-lock-contextually.
-rw-r--r--lisp/treesit.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 177c185c745..4bba2218327 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -1302,6 +1302,11 @@ If `treesit-defun-type-regexp' is non-nil, setup
1302 (setq-local font-lock-defaults '(nil t)) 1302 (setq-local font-lock-defaults '(nil t))
1303 (setq-local font-lock-fontify-region-function 1303 (setq-local font-lock-fontify-region-function
1304 #'treesit-font-lock-fontify-region) 1304 #'treesit-font-lock-fontify-region)
1305 ;; `font-lock-mode' sets this to t when syntactic font-lock is
1306 ;; enabled (i.e., `font-lock-keywords-only' is nil). We disable
1307 ;; font-lock's syntactic fontification, and do it ourselves, so we
1308 ;; still need `jit-lock-contextually' to be t, set it ourselves.
1309 (setq-local jit-lock-contextually t)
1305 (font-lock-mode 1) 1310 (font-lock-mode 1)
1306 (treesit-font-lock-recompute-features)) 1311 (treesit-font-lock-recompute-features))
1307 ;; Indent. 1312 ;; Indent.