From f0e8bd238872387863699d7909580e6ccf77012d Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 30 Mar 2020 21:57:32 +0100 Subject: [PATCH] chore(editor): Use siren-display-indentation exclusively Instead of directly using the my current favorite indentation highlighting package in various places, only use the siren-display-indentation function. This lets me control it from a single central place. --- modules/editor/siren-highlight-indent-guides.el | 3 --- modules/editor/siren-highlight-indentation.el | 5 +---- modules/languages/siren-golang.el | 2 ++ modules/languages/siren-prog-mode.el | 3 +++ 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/editor/siren-highlight-indent-guides.el b/modules/editor/siren-highlight-indent-guides.el index 3725a43..a2db08c 100644 --- a/modules/editor/siren-highlight-indent-guides.el +++ b/modules/editor/siren-highlight-indent-guides.el @@ -11,9 +11,6 @@ :commands highlight-indent-guides-mode :diminish highlight-indent-guides-mode - :hook - (prog-mode . highlight-indent-guides-mode) - :custom (highlight-indent-guides-auto-even-face-perc 3) (highlight-indent-guides-auto-odd-face-perc 2.5) diff --git a/modules/editor/siren-highlight-indentation.el b/modules/editor/siren-highlight-indentation.el index 7cd38a6..9f72d06 100644 --- a/modules/editor/siren-highlight-indentation.el +++ b/modules/editor/siren-highlight-indentation.el @@ -9,10 +9,7 @@ (use-package highlight-indentation :defer t :diminish (highlight-indentation-mode - highlight-indentation-current-column-mode) - - :hook - (prog-mode . highlight-indent-guides-mode)) + highlight-indentation-current-column-mode)) (provide 'siren-highlight-indentation) ;;; siren-highlight-indentation.el ends here diff --git a/modules/languages/siren-golang.el b/modules/languages/siren-golang.el index ecd3908..3a7e58a 100644 --- a/modules/languages/siren-golang.el +++ b/modules/languages/siren-golang.el @@ -7,6 +7,7 @@ ;;; Code: (require 'siren-company) +(require 'siren-display-indentation) (require 'siren-flycheck) (require 'siren-folding) (require 'siren-lsp) @@ -43,6 +44,7 @@ (when (fboundp 'auto-highlight-symbol-mode) (auto-highlight-symbol-mode -1)) + (siren-display-indentation -1) (company-mode +1) (lsp-deferred) (siren-folding) diff --git a/modules/languages/siren-prog-mode.el b/modules/languages/siren-prog-mode.el index f8d2470..c345dee 100644 --- a/modules/languages/siren-prog-mode.el +++ b/modules/languages/siren-prog-mode.el @@ -6,6 +6,8 @@ ;;; Code: +(require 'siren-display-indentation) + (use-package prog-mode :straight (:type built-in) :hook @@ -17,6 +19,7 @@ (setq fill-column 80 whitespace-action '(auto-cleanup)) + (siren-display-indentation 1) (visual-line-mode t) (whitespace-mode t)))