feat: add new AerialNormal highlight as a fallback for all text (#278)

* feat: add new `AerialNormal` highlight as a fallback for all text

* [docgen] Update docs
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
This commit is contained in:
Micah Halter 2023-07-11 12:47:16 -04:00 committed by GitHub
parent 66078ea0fa
commit b4eb257e54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -661,6 +661,9 @@ hi link AerialClassIcon Special
hi link AerialFunction Special
hi AerialFunctionIcon guifg=#cb4b16 guibg=NONE guisp=NONE gui=NONE cterm=NONE
" There's also this group for the fallback of the text if a specific
" class highlight isn't defined
hi link AerialNormal Normal
" There's also this group for the cursor position
hi link AerialLine QuickFixLine
" If highlight_mode="split_width", you can set a separate color for the

View file

@ -55,6 +55,18 @@ M.get_highlight = function(symbol, is_icon, is_collapsed)
end
M.create_highlight_groups = function()
-- Use Normal colors for AerialNormal, while stripping bold/italic/etc
local normal_defn = vim.api.nvim_get_hl_by_name("Normal", true)
-- The default text highlight
vim.api.nvim_set_hl(0, "AerialNormal", {
fg = normal_defn.foreground,
bg = normal_defn.background,
ctermfg = normal_defn.ctermfg,
ctermbg = normal_defn.ctermbg,
blend = normal_defn.blend,
default = true,
})
-- The line that shows where your cursor(s) are
link("AerialLine", "QuickFixLine")
link("AerialLineNC", "AerialLine")
@ -80,7 +92,7 @@ M.create_highlight_groups = function()
-- The name of the symbol
for _, symbol_kind in ipairs(symbol_kinds) do
link(string.format("Aerial%s", symbol_kind), "NONE")
link(string.format("Aerial%s", symbol_kind), "AerialNormal")
end
-- The icon displayed to the left of the symbol