Function: indent-bars-setup
indent-bars-setup is a natively compiled function defined in
indent-bars.el.
Signature
(indent-bars-setup)
Documentation
Setup all face, color, bar size, and indentation info for the current buffer.
Source Code
;; Defined in /nix/store/zkcdcnmcj3605fj09x584bf58d85brax-emacs-packages-deps/share/emacs/site-lisp/elpa/indent-bars-1.0.1/indent-bars.el
(defun indent-bars-setup ()
"Setup all face, color, bar size, and indentation info for the current buffer."
;; Spacing
(setq indent-bars-spacing (indent-bars--guess-spacing)
indent-bars--offset (or indent-bars-starting-column indent-bars-spacing))
;; No Stipple (e.g. terminal)
(setq indent-bars--no-stipple
(or (not (display-graphic-p)) indent-bars-prefer-character))
;; Invisible face
(indent-bars--initialize-invisible-face)
;; Style (color + stipple)
(unless (and indent-bars-style indent-bars--styles)
(indent-bars--initialize-style
(setq indent-bars-style (indent-bars--new-style))))
;; Window state: selection/size
(unless indent-bars--no-stipple
(add-hook 'window-state-change-functions
#'indent-bars--window-change nil t))
;; PPSS
(setq indent-bars--ppss
(or indent-bars-no-descend-string indent-bars-no-descend-lists))
;; Treesitter
(if indent-bars-treesit-support (indent-bars--ts-mode 1)) ; autoloads
;; Remap/Resize
(unless indent-bars--no-stipple
(setq indent-bars--stipple-remaps (make-hash-table))
(add-hook 'text-scale-mode-hook #'indent-bars--update-all-stipples nil t)
(indent-bars--update-all-stipples)) ; sets all stipple remaps for current buffer
;; Current depth Highlighting
(when (indent-bars--style 'any "highlight-current-depth")
(add-hook 'post-command-hook
#'indent-bars--update-current-depth-highlight nil t)
(setq indent-bars--current-depth 0)
(indent-bars--update-current-depth-highlight))
;;Jit/Font-lock
(cl-pushnew 'indent-bars-display (alist-get 'display char-property-alias-alist))
(indent-bars--setup-font-lock)
(jit-lock-refontify))