fix: default highlight group in nav view is NormalFloat (#281)

This commit is contained in:
Steven Arcangeli 2023-07-30 16:34:55 -07:00
parent d49d62b56f
commit 2a6498f4b5
2 changed files with 17 additions and 0 deletions

View file

@ -67,6 +67,16 @@ M.create_highlight_groups = function()
default = true,
})
-- Set another group for NormalFloat, for use in the nav view
local normal_float_defn = vim.api.nvim_get_hl_by_name("NormalFloat", true)
-- Don't set the background for the float so that it blends nicely with the cursorline
vim.api.nvim_set_hl(0, "AerialNormalFloat", {
fg = normal_float_defn.foreground,
ctermfg = normal_float_defn.ctermfg,
blend = normal_float_defn.blend,
default = true,
})
-- The line that shows where your cursor(s) are
link("AerialLine", "QuickFixLine")
link("AerialLineNC", "AerialLine")

View file

@ -71,6 +71,13 @@ function AerialNav.new(bufnr, winid)
border = config.nav.border,
style = "minimal",
})
for _, floatwin in ipairs({ left_win, main_win, right_win }) do
vim.api.nvim_set_option_value(
"winhighlight",
"AerialNormal:AerialNormalFloat",
{ scope = "local", win = floatwin }
)
end
local nav = setmetatable({
winid = winid,
bufnr = bufnr,