2019-03-11 12:39:38 -04:00
|
|
|
;;; ui/indent-guides/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! highlight-indent-guides
|
2019-03-11 12:39:38 -04:00
|
|
|
:hook ((prog-mode text-mode conf-mode) . highlight-indent-guides-mode)
|
2023-12-05 17:41:59 -05:00
|
|
|
:init
|
|
|
|
(setq highlight-indent-guides-method (if (display-graphic-p) 'bitmap 'character)
|
|
|
|
highlight-indent-guides-bitmap-function #'highlight-indent-guides--bitmap-line)
|
2019-03-11 16:46:55 -04:00
|
|
|
:config
|
2022-10-27 19:55:07 +02:00
|
|
|
;; HACK: If this package is loaded too early (by the user, and in terminal
|
|
|
|
;; Emacs), then `highlight-indent-guides-auto-set-faces' will have been
|
|
|
|
;; called much too early to set its faces correctly. To get around this, we
|
|
|
|
;; need to call it again, but at a time when I can ensure a frame exists an
|
|
|
|
;; the current theme is loaded.
|
|
|
|
(when (doom-context-p 'init)
|
|
|
|
(add-hook 'doom-first-buffer-hook #'highlight-indent-guides-auto-set-faces))
|
2020-03-31 16:30:30 -04:00
|
|
|
|
|
|
|
;; `highlight-indent-guides' breaks when `org-indent-mode' is active
|
2020-07-31 01:25:20 -04:00
|
|
|
(add-hook! 'org-mode-local-vars-hook
|
2019-07-18 15:27:20 +02:00
|
|
|
(defun +indent-guides-disable-maybe-h ()
|
2020-07-31 02:45:57 -04:00
|
|
|
(and highlight-indent-guides-mode
|
|
|
|
(bound-and-true-p org-indent-mode)
|
|
|
|
(highlight-indent-guides-mode -1)))))
|