local highlight = {
    "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, "RainbowRed", { fg = "#CC241D" })
    vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#D79921" })
    vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#458588" })
    vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D65D0E" })
    vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98971A" })
    vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#B16286" })
    vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#689D6A" })
end)

require("ibl").setup { indent = { highlight = highlight } }
