Skip to content

indent‐bars config Wiki

JD Smith edited this page Sep 13, 2024 · 6 revisions

Include information about tested configurations here.

tree-sitter config

As of v0.2, indent-bars can use tree-sitter to avoid adding more bars than necessary inside wrapping elements: typically function call/definition argument lists, and other nested structures. It can also omit styling on "top-level" blank lines in the file, e.g. in the "module" of a python file, and (by default) doesn't descend deeper into strings.

In v0.5, scope focus was introduced, allowing alternative bar styling within and outside the current configurable "scope", as determined by tree-sitter.

Include your validated config using tree-sitter here:

Python

In use-package style:

  :custom
  (indent-bars-treesit-support t)
  (indent-bars-treesit-wrap '((python argument_list parameters
				      list list_comprehension
				      dictionary dictionary_comprehension
				      parenthesized_expression subscript)))
  (indent-bars-treesit-ignore-blank-lines-types '("module"))

C/C++

In use-package style:

:custom
(indent-bars-treesit-support t)
(indent-bars-treesit-wrap '((c argument_list parameter_list init_declarator)))

Style config

Include styling config, e.g. for main bars and/or tree-sitter scope-focus.

Clone this wiki locally