indent-blankline.lua 1008 B

123456789101112131415161718192021222324252627
  1. local hooks = require "ibl.hooks"
  2. local custom_colors = require "custom.colors"
  3. local highlight = {
  4. "RainbowRed",
  5. "RainbowYellow",
  6. "RainbowBlue",
  7. "RainbowOrange",
  8. "RainbowGreen",
  9. "RainbowViolet",
  10. "RainbowCyan",
  11. }
  12. -- create the highlight groups in the highlight setup hook,
  13. -- so the are reset every time the colorscheme changes
  14. hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
  15. vim.api.nvim_set_hl(0, "RainbowRed", { fg = custom_colors.IndentRed_fg })
  16. vim.api.nvim_set_hl(0, "RainbowYellow", { fg = custom_colors.IndentYellow_fg })
  17. vim.api.nvim_set_hl(0, "RainbowBlue", { fg = custom_colors.IndentBlue_fg })
  18. vim.api.nvim_set_hl(0, "RainbowOrange", { fg = custom_colors.IndentOrange_fg })
  19. vim.api.nvim_set_hl(0, "RainbowGreen", { fg = custom_colors.IndentGreen_fg })
  20. vim.api.nvim_set_hl(0, "RainbowViolet", { fg = custom_colors.IndentViolet_fg })
  21. vim.api.nvim_set_hl(0, "RainbowCyan", { fg = custom_colors.IndentCyan_fg })
  22. end)
  23. require("ibl").setup { indent = { highlight = highlight } }