diff options
Diffstat (limited to '.config/nvim/lua/plugins.lua')
-rw-r--r-- | .config/nvim/lua/plugins.lua | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 85f0e6a..8506e15 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -88,7 +88,8 @@ local PKGS = { local function init_plugins() local paq = require("paq") - local indent_blankline = require("indent_blankline") + local indent_blankline = require("ibl") + local indent_blankline_hooks = require("ibl.hooks") local colorizer = require("colorizer") local ufo = require("ufo") local catppuccin = require("catppuccin") @@ -123,27 +124,29 @@ local function init_plugins() paq(PKGS) - vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]] - vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]] - vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]] - vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]] - vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]] - vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]] - - indent_blankline.setup { - char_highlight_list = { - "IndentBlanklineIndent1"; - "IndentBlanklineIndent2"; - "IndentBlanklineIndent3"; - "IndentBlanklineIndent4"; - "IndentBlanklineIndent5"; - "IndentBlanklineIndent6"; - }; - show_end_of_line = true; - space_char_blankline = " "; - show_current_context = true; - show_current_context_start = true; + local highlight = { + "RainbowRed"; + "RainbowYellow"; + "RainbowBlue"; + "RainbowOrange"; + "RainbowGreen"; + "RainbowViolet"; + "RainbowCyan"; } + -- create the highlight groups in the highlight setup hook, so they are reset + -- every time the colorscheme changes + indent_blankline_hooks.register(indent_blankline_hooks.type.HIGHLIGHT_SETUP, + function() + 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) + + indent_blankline.setup({ indent = { highlight = highlight; tab_char = "▎" } }) colorizer.setup({ "*" }, { RGB = true; -- #RGB hex codes |