From dd7ae8366c918265f025db511aaa8b10efab6eae Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Sat, 16 Sep 2023 19:36:03 +0200 Subject: [PATCH] Add ~indent-bars-mode~ Signed-off-by: Magic_RB --- emacs-lisp/indent_bars.org | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 emacs-lisp/indent_bars.org diff --git a/emacs-lisp/indent_bars.org b/emacs-lisp/indent_bars.org new file mode 100644 index 0000000..2853a4d --- /dev/null +++ b/emacs-lisp/indent_bars.org @@ -0,0 +1,44 @@ +:PROPERTIES: +:header-args:emacs-lisp: :comments link :results none +:ID: 044ab3bc-7911-4bd3-b762-d7556695a027 +:END: +#+title: Indent Bars +#+filetags: emacs-load + +Load indent bars. + +#+begin_src emacs-lisp :noweb yes + (use-package indent-bars + :straight + (:package "package" + :host github :type git + :repo "jdtsmith/indent-bars") + :hook + <> + :config + <>) +#+end_src + +Customize the visual of the bars to minimal style, based on the example shown on GitHub. + +#+name: indent-bars-visual +#+begin_src emacs-lisp :tangle no + (setq + indent-bars-color '("#ffffff" :face-bg t :blend 0.3) + indent-bars-pattern "." + indent-bars-width-frac 0.1 + indent-bars-pad-frac 0.1 + indent-bars-zigzag nil + indent-bars-color-by-depth nil + indent-bars-highlight-current-depth nil + indent-bars-display-on-blank-lines nil) +#+end_src + + + Hook ~indent-bars-mode~ onto language major modes. + +#+name: indent-bars-hooks +#+begin_src emacs-lisp :tangle no + (nix-mode . (lambda () (setq indent-bars-display-on-blank-lines t indent-bars-spacing-override 2) (indent-bars-mode))) +#+end_src +