From c689d1201c519cd6ae4768bdfe04b8057fc513f5 Mon Sep 17 00:00:00 2001 From: eriedaberrie Date: Thu, 31 Oct 2024 13:41:08 -0700 Subject: [PATCH] Don't highlight indent guides on really big buffers --- init.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 996e531..5d7a5e2 100644 --- a/init.el +++ b/init.el @@ -242,11 +242,16 @@ :hook prog-mode sly-mrepl-mode racket-repl-mode) (use-package highlight-indent-guides - :hook prog-mode + :hook (prog-mode . my-maybe-highlight-indent-guides) :custom (highlight-indent-guides-auto-enabled nil) (highlight-indent-guides-method 'character) - (highlight-indent-guides-responsive 'stack)) + (highlight-indent-guides-responsive 'stack) + :config + (defun my-maybe-highlight-indent-guides () + (interactive) + (unless (> (count-lines (point-min) (point-max)) 10000) + (highlight-indent-guides-mode)))) (use-package which-key :demand t