Open LokiNaBoki opened 8 months ago
I stumbled upon the same issue and helped myself by defining a first highlight without colors.
local highlight = {
"IblIndent", -- This will be invisible for the first level
"RainbowRed",
"RainbowYellow",
"RainbowBlue",
"RainbowOrange",
"RainbowGreen",
"RainbowViolet",
"RainbowCyan",
}
local hooks = require "ibl.hooks"
-- create the highlight groups in the highlight setup hook, so they are reset
-- every time the colorscheme changes
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
vim.api.nvim_set_hl(0, "IblIndent", { fg = "NONE" })
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
end)
But would have much more prefered some option like ident_level = 2.
The proper way to do this is probably to have a hook that can dynamically exclude a scope, here. https://github.com/lukas-reineke/indent-blankline.nvim/blob/65e20ab94a26d0e14acac5049b8641336819dfc7/lua/ibl/scope.lua#L78-L82
I'm open to add this if someone wants to make a PR.
Problem
If you have the scope indents enabled, there is no option or hook to disable them in the first column.
As far as I can remember the
show_first_indent_level
option from V2 worked for both regular and scope indents. Now there is justhide_first_space_indent_level
which hides only regular indents.I made this hook to get rid of scope indents in the first column:
but it feels really hacky. I have to hardcode the values:
'┃'
and{ ' ', { "@ibl.whitespace.char.1" } }
, instead of usingindent.whitespace.INDENT
andindent.whitespace.SPACE
as in the built-in hook.Expected behavior
The expected behavior is to have something like
indent.whitespace
enum, but for the scoped indents