feat: add customizable tab, indent, and scope characters

This commit is contained in:
2024-09-16 13:48:59 -04:00
parent f1edd2aba0
commit 16d98a918c
4 changed files with 91 additions and 37 deletions
+19 -2
View File
@@ -70,11 +70,28 @@ function M.setup_indent_highlight()
end)
end
-- Define characters for indent-blankline
local tab_char, indent_char
if vim.g.tab_char then
tab_char = vim.g.tab_char
elseif vim.g.tab_char_name then
tab_char = data.types.ibl.char[vim.g.tab_char_name]
else
tab_char = data.types.ibl.char.none
end
if vim.g.indent_char then
indent_char = vim.g.indent_char
elseif vim.g.indent_char_name then
indent_char = data.types.ibl.char[vim.g.indent_char_name]
else
indent_char = data.types.ibl.char.none
end
-- Configure the indent-blankline plugin
require("ibl").setup({
indent = {
char = vim.g.indent_char or data.types.ibl.indent_char.none,
tab_char = vim.g.tab_char or data.types.ibl.tab_char.simple,
char = indent_char,
tab_char = tab_char,
highlight = {
"IndentBlanklineIndent",
},