From 811b1f38766e1efe3f9af28e71fc776f65a91f7f Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Sat, 4 Sep 2021 17:46:33 -0500 Subject: [PATCH] feat: colored indent levels for indent blankline --- lua/catppuccino/config.lua | 7 +++++-- .../core/integrations/indent_blankline.lua | 14 +++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lua/catppuccino/config.lua b/lua/catppuccino/config.lua index 3282adc..194cae0 100644 --- a/lua/catppuccino/config.lua +++ b/lua/catppuccino/config.lua @@ -27,7 +27,7 @@ config.options = { hints = "underline", warnings = "underline", information = "underline", - } + }, }, lsp_trouble = false, lsp_saga = false, @@ -39,7 +39,10 @@ config.options = { show_root = false, }, which_key = false, - indent_blankline = false, + indent_blankline = { + enabled = false, + colored_indent_levels = false, + }, dashboard = false, neogit = false, vim_sneak = false, diff --git a/lua/catppuccino/core/integrations/indent_blankline.lua b/lua/catppuccino/core/integrations/indent_blankline.lua index 6032d76..df0c078 100644 --- a/lua/catppuccino/core/integrations/indent_blankline.lua +++ b/lua/catppuccino/core/integrations/indent_blankline.lua @@ -1,9 +1,21 @@ local M = {} function M.get(cpt) - return { + + local hi = { IndentBlanklineChar = { fg = cpt.gray }, } + + if cpc.integrations.indent_blankline.colored_indent_levels then + hi["IndentBlanklineIndent6"] = {blend = "nocombine", fg = cpt.yellow} + hi["IndentBlanklineIndent5"] = {blend = "nocombine", fg = cpt.red} + hi["IndentBlanklineIndent4"] = {blend = "nocombine", fg = cpt.green} + hi["IndentBlanklineIndent3"] = {blend = "nocombine", fg = cpt.orange} + hi["IndentBlanklineIndent2"] = {blend = "nocombine", fg = cpt.blue} + hi["IndentBlanklineIndent1"] = {blend = "nocombine", fg = cpt.magenta} + end + + return hi end return M