From c664e1edefaab0014bdc7de8c53cd42e5dc2f7a2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 1 Sep 2025 20:53:57 +0200 Subject: [PATCH] fix(indent-guides): in org src blocks This can break syntax highighting for some treesit-enabled major modes in org src blocks. --- modules/ui/indent-guides/config.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ui/indent-guides/config.el b/modules/ui/indent-guides/config.el index b60191a9c..f88c98e6e 100644 --- a/modules/ui/indent-guides/config.el +++ b/modules/ui/indent-guides/config.el @@ -61,7 +61,13 @@ be enabled. If any function returns non-nil, the mode will not be activated." ;; used for completion or eldoc popups). ;; REVIEW: Swap with `frame-parent' when 27 support is dropped (defun +indent-guides-in-childframe-p () - (frame-parameter nil 'parent-frame))) + (frame-parameter nil 'parent-frame)) + ;; indent-guides in src blocks can cause syntax highlighting to fail + ;; abruptly for some major modes (particularly *-ts-modes or rustic-mode). + ;; Since it's already working on the super org buffer, it's redundant to let + ;; it work on the contents of each babel block. + (defun +indent-guides-in-org-src-block-p () + (string-prefix-p " *org-src-fontification:" (buffer-name)))) ;; HACK: The way `indent-bars-display-on-blank-lines' functions, it places ;; text properties with a display property containing a newline, which