Add ~indent-bars-mode~

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-09-16 19:36:03 +02:00
parent 531b8cd5e6
commit dd7ae8366c

View file

@ -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
<<indent-bars-hooks>>
:config
<<indent-bars-visual>>)
#+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