Disable indent guides in incompatible modes
e.g. visual-line-mode & org-indent-mode
This commit is contained in:
parent
a2fd7fc877
commit
29277c9b02
1 changed files with 8 additions and 1 deletions
|
@ -10,4 +10,11 @@
|
|||
(defun +indent-guides-for-all-but-first-column (level responsive display)
|
||||
(unless (< level 1)
|
||||
(highlight-indent-guides--highlighter-default level responsive display)))
|
||||
(setq highlight-indent-guides-highlighter-function #'+indent-guides-for-all-but-first-column))
|
||||
(setq highlight-indent-guides-highlighter-function #'+indent-guides-for-all-but-first-column)
|
||||
|
||||
(defun +indent-guides|disable-maybe ()
|
||||
(when highlight-indent-guides
|
||||
(highlight-indent-guides -1)))
|
||||
;; `highlight-indent-guides' breaks in `visual-line-mode'
|
||||
(add-hook 'visual-line-mode-hook #'+indent-guides|disable-maybe)
|
||||
(add-hook 'org-indent-mode-hook #'+indent-guides|disable-maybe))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue