From bb7493845daa9eedb1a86022f1119319c0af2fad Mon Sep 17 00:00:00 2001 From: Max Miliano Date: Fri, 2 Aug 2024 22:34:39 -0300 Subject: [PATCH] feat: bufferline.nvim --- lua/dracula/config.lua | 1 + lua/dracula/highlights.lua | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lua/dracula/config.lua b/lua/dracula/config.lua index 58172fd..95ecd1a 100644 --- a/lua/dracula/config.lua +++ b/lua/dracula/config.lua @@ -48,5 +48,6 @@ return { ['mini.tabline'] = true, ['mini.starter'] = true, ['mini.cursorword'] = true, + ['bufferline.nvim'] = true, }, } diff --git a/lua/dracula/highlights.lua b/lua/dracula/highlights.lua index 7d9dde8..826b2fd 100644 --- a/lua/dracula/highlights.lua +++ b/lua/dracula/highlights.lua @@ -396,11 +396,11 @@ M.set_highlight = function(colors, config) nvim_set_hl('MoreMsg', { link = 'ModeMsg' }) nvim_set_hl('NonText', { fg = colors.base01 }) nvim_set_hl('Normal', { fg = colors.base0, bg = colors.base03 }, { transparent = config.transparent }) - nvim_set_hl('NormalFloat', { fg = colors.base0, bg = colors.base04 }, { transparent = config.transparent }) + nvim_set_hl('NormalFloat', { fg = colors.base0, bg = colors.base04 }) nvim_set_hl('FloatBorder', { link = 'WinSeparator' }) nvim_set_hl('FloatTitle', { fg = colors.purple, bold = true }) nvim_set_hl('NormalNC', { link = 'Normal' }) - nvim_set_hl('Pmenu', { fg = colors.base0, bg = colors.base04 }) + nvim_set_hl('Pmenu', { fg = colors.base0, bg = colors.base04 }, { transparent = config.transparent }) nvim_set_hl('PmenuSel', { fg = colors.cyan, reverse = true }) nvim_set_hl('PmenuKind', { link = 'Pmenu' }) nvim_set_hl('PmenuKindSel', { link = 'PmenuSel' }) @@ -691,6 +691,7 @@ M.set_highlight = function(colors, config) if config.plugins['which-key.nvim'] then nvim_set_hl('WhichKey', { fg = colors.green }) + nvim_set_hl('WhichKeyNormal', { fg = colors.green }, { transparent = config.transparent }) nvim_set_hl('WhichKeyDesc', { fg = colors.orange, italic = true }) nvim_set_hl('WhichKeySeparator', { fg = colors.pink }) nvim_set_hl('WhichKeyGroup', { fg = colors.purple }) @@ -829,6 +830,17 @@ M.set_highlight = function(colors, config) if config.plugins['mini.cursorword'] then nvim_set_hl('MiniCursorword', { link = 'Visual' }) end + + if config.plugins['bufferline.nvim'] and config.transparent then + local color = require('dracula.color') + local background = color.shade(colors.base02, 2) + nvim_set_hl('BufferLineFill', { bg = background }) + nvim_set_hl('BufferLineBufferSelected', { fg = colors.base0 }) + nvim_set_hl('BufferLineSeparator', { fg = background }) + nvim_set_hl('BufferLineSeparatorSelected', { fg = background }) + nvim_set_hl('BufferLineSeparatorVisible', { fg = background }) + end + if config.on_highlights then local color = require 'dracula.color' local highlights = config.on_highlights(colors, color)