chunk have five configurable items
- enable
- notify
- use_treesitter
- chars
- style
- exclude_filetype
enable
is used to control whether enable hl_indent, if set it to false, its usercmd and autocmd will not set, so it will not work
notify
is used to control whether notify when some situation(like disable indent mod double time)
use_treesitter
is a boolean value, if set it to true, this mod will judge indent by using treesitter
chars
is used to configure what char to render the indent line, it is a table contains many char, like this
chars = {
"│",
"¦",
"┆",
"┊",
},
style
is a RGB string or RGB string list, if it is a table, it will choice different color to render different indent line
exclude_filetype
is opposite of support_filetypes, it is a lua table like this, the default exclude_filetypes can be found in the default config
exclude_filetype = {
aerial = true,
NvimTree = true,
}
below is the default style of indent line
indent = {
chars = {
"│",
},
style = {
vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Whitespace")), "fg", "gui"),
},
}
you can also set it like rainbow 🌈
indent = {
chars = {
"│",
},
style = {
"#FF0000",
"#FF7F00",
"#FFFF00",
"#00FF00",
"#00FFFF",
"#0000FF",
"#8B00FF",
},
}
it also can configure use multiple chars
indent = {
chars = {
"│",
"¦",
"┆",
"┊",
},
style = {
vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Whitespace")), "fg", "gui"),
},
}
if you like bold line, you can set background color
indent = {
enable = true,
use_treesitter = false,
chars = {
" ",
},
style = {
{ bg = vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Whitespace")), "fg", "gui") },
},
exclude_filetype = exclude_ft,
}
```