repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

feat(cmdline): add per-format corner highlights with Normal.bg

61d72a82af66f20c2005fe20724f4ff1f226fff7

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Add CmdlineBorderCorner* groups (Search, Shell, Help, Lua, Input,
Cmdline) that inherit fg from their CmdlineBorder* sibling but set
bg to FloatBorderCorner.bg (Normal.bg) for the corner blend effect.

Update BORDER_HIGHLIGHT_MAP to use { border, corner } structure
and get_winhighlight() to apply them separately to FloatBorder and
FloatBorderCorner respectively.

Changed files (2)

neovim/lua/bugabinga/cmdline/render.lua

Modified
17 17 local BORDER_HIGHLIGHT_MAP = {
18 - search_down = 'CmdlineBorderSearch',
19 - search_up = 'CmdlineBorderSearch',
20 - shell = 'CmdlineBorderShell',
21 - help = 'CmdlineBorderHelp',
22 - lua = 'CmdlineBorderLua',
23 - input = 'CmdlineBorderInput',
24 - cmdline = 'CmdlineBorderCmdline',
18 + search_down = { border = 'CmdlineBorderSearch', corner = 'CmdlineBorderCornerSearch' },
19 + search_up = { border = 'CmdlineBorderSearch', corner = 'CmdlineBorderCornerSearch' },
20 + shell = { border = 'CmdlineBorderShell', corner = 'CmdlineBorderCornerShell' },
21 + help = { border = 'CmdlineBorderHelp', corner = 'CmdlineBorderCornerHelp' },
22 + lua = { border = 'CmdlineBorderLua', corner = 'CmdlineBorderCornerLua' },
23 + input = { border = 'CmdlineBorderInput', corner = 'CmdlineBorderCornerInput' },
24 + cmdline = { border = 'CmdlineBorderCmdline', corner = 'CmdlineBorderCornerCmdline' },
27 27 local ICON_HIGHLIGHT_MAP = {
37 37 local function get_winhighlight(type)
38 - local border_hl = BORDER_HIGHLIGHT_MAP[type] or 'CmdlineBorderCmdline'
39 - return string.format('Normal:NormalFloat,FloatBorder:%s,FloatBorderCorner:%s', border_hl, border_hl)
38 + local hl = BORDER_HIGHLIGHT_MAP[type] or BORDER_HIGHLIGHT_MAP.cmdline
39 + return string.format('Normal:NormalFloat,FloatBorder:%s,FloatBorderCorner:%s', hl.border, hl.corner)
42 42 local function get_buf()

neovim/lua/bugabinga/nugu/init.lua

Modified
159 159 _.CmdlineBorderLua { fg = content_focus, bg = _.NormalFloat.bg }
160 160 _.CmdlineBorderInput { fg = ui_important_local, bg = _.NormalFloat.bg }
161 161 _.CmdlineBorderCmdline { fg = ui_minor, bg = _.NormalFloat.bg }
162 - _.CmdlineIconSearch { fg = _.CmdlineBorderSearch.fg }
163 - _.CmdlineIconShell { fg = _.CmdlineBorderShell.fg }
164 - _.CmdlineIconHelp { fg = _.CmdlineBorderHelp.fg }
165 - _.CmdlineIconLua { fg = _.CmdlineBorderLua.fg }
166 - _.CmdlineIconInput { fg = _.CmdlineBorderInput.fg }
167 - _.CmdlineIconCmdline { fg = _.CmdlineBorderCmdline.fg }
162 + _.CmdlineBorderCornerSearch { fg = _.CmdlineBorderSearch.fg, bg = _.FloatBorderCorner.bg }
163 + _.CmdlineBorderCornerShell { fg = _.CmdlineBorderShell.fg, bg = _.FloatBorderCorner.bg }
164 + _.CmdlineBorderCornerHelp { fg = _.CmdlineBorderHelp.fg, bg = _.FloatBorderCorner.bg }
165 + _.CmdlineBorderCornerLua { fg = _.CmdlineBorderLua.fg, bg = _.FloatBorderCorner.bg }
166 + _.CmdlineBorderCornerInput { fg = _.CmdlineBorderInput.fg, bg = _.FloatBorderCorner.bg }
167 + _.CmdlineBorderCornerCmdline { fg = _.CmdlineBorderCmdline.fg, bg = _.FloatBorderCorner.bg }
168 +_.CmdlineIconSearch { fg = _.CmdlineBorderSearch.fg }
169 +_.CmdlineIconShell { fg = _.CmdlineBorderShell.fg }
170 +_.CmdlineIconHelp { fg = _.CmdlineBorderHelp.fg }
171 +_.CmdlineIconLua { fg = _.CmdlineBorderLua.fg }
172 +_.CmdlineIconInput { fg = _.CmdlineBorderInput.fg }
173 +_.CmdlineIconCmdline { fg = _.CmdlineBorderCmdline.fg }
168 174 _.Question { fg = ui_important_local, bold = true }
169 175 _.QuickFixLine = _.PmenuSel
170 176 _.SpecialKey { fg = error, bg = content_unfocus, bold = true }