mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08:00
fix(indent-guides): in org src blocks
This can break syntax highighting for some treesit-enabled major modes in org src blocks.
This commit is contained in:
parent
a51690f033
commit
c664e1edef
1 changed files with 7 additions and 1 deletions
|
|
@ -61,7 +61,13 @@ be enabled. If any function returns non-nil, the mode will not be activated."
|
||||||
;; used for completion or eldoc popups).
|
;; used for completion or eldoc popups).
|
||||||
;; REVIEW: Swap with `frame-parent' when 27 support is dropped
|
;; REVIEW: Swap with `frame-parent' when 27 support is dropped
|
||||||
(defun +indent-guides-in-childframe-p ()
|
(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
|
;; HACK: The way `indent-bars-display-on-blank-lines' functions, it places
|
||||||
;; text properties with a display property containing a newline, which
|
;; text properties with a display property containing a newline, which
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue