-
-
Notifications
You must be signed in to change notification settings - Fork 113
Description
apology
Apologies, and please forgive me if this is already explained somewhere I missed.
I read through the entire :help ibl, and tried to find similar issues/examples, but couldn't find my exact request.
Currently have
So — I've managed my setup to be almost exactly how I like it:
(this is an extreme example of indentation)

Desired result → 1
The only thing it's missing are the background colors of the indentation level. I discovered how you can can do it, but it seems to be mutually exclusive with indentation guides (because of setting highlight of indent & whitespace) which then stops the lines from working.
Is there a way to do both? It's okay if not, I was just trying to replicate my VSCode setup, since I really liked that one.
Desired result → 2 (Found the solution ✅ )
An alternative I would be interested in would be to dim the indent lines, that are out of scope. Kind of like this:

Edit: got it working!

solution:
config = function()
local highlightLines = {
'RainbowRed',
-- ... and so on for the other colors
}
local highlightDimLines = {
'RainbowDimRed',
-- ... and so on for the other colors
}
local hooks = require 'ibl.hooks'
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
vim.api.nvim_set_hl(0, 'RainbowRed', { fg = felixai.red400 })
-- ... and so on for the other colors
end)
vim.g.rainbow_delimiters = { highlight = highlightLines }
require('ibl').setup {
indent = {
highlight = highlightDimLines,
char = '┊',
tab_char = '┊',
},
scope = {
highlight = highlightLines,
char = '▎',
}
}
end,I will update this issue and close when I figure out how to do these things.