From 6f97a15fbb2e3a685f5704a2713e8ddbefdfeb10 Mon Sep 17 00:00:00 2001 From: Michael Rolli Date: Mon, 3 Nov 2025 16:51:37 +0100 Subject: [PATCH] feat: mimic lualine mode indicator for both fg and bg When using highlight set to foreground, actually mimic the exact same style that the lualine mode indicator has, e.g. setting fg and bg accordingly. For highlight set to background, only set fg as is. --- lua/modicator/integration/lualine/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/modicator/integration/lualine/init.lua b/lua/modicator/integration/lualine/init.lua index 85e10d1..ce0f200 100644 --- a/lua/modicator/integration/lualine/init.lua +++ b/lua/modicator/integration/lualine/init.lua @@ -93,8 +93,10 @@ local function set_highlight_from_lualine(mode, mode_section_letter) local highlight_exists = require('modicator.utils').highlight_exists if hl and not highlight_exists(mode_hl_group) then local options = modicator.get_options() - local highlight_level = options.integration.lualine.highlight - vim.api.nvim_set_hl(0, mode_hl_group, { fg = hl[highlight_level] }) + local hl_table = options.integration.lualine.highlight == "bg" + and { fg = hl["bg"] } + or { fg = hl["fg"], bg = hl["bg"] } + vim.api.nvim_set_hl(0, mode_hl_group, hl_table) end end