Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions lua/hydra/lib/highlight.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
local api = vim.api

local function get_hl(name)
---@type boolean
local rgb = api.nvim_get_option('termguicolors')
return api.nvim_get_hl_by_name(name, rgb)
end

local name, settings
for _, color in ipairs({ 'Red', 'Blue', 'Amaranth', 'Teal', 'Pink' }) do
settings = vim.tbl_deep_extend('force',
get_hl('StatusLine'),
get_hl(string.format('Hydra%s', color))
api.nvim_get_hl(0, { name = 'StatusLine', link = false }),
api.nvim_get_hl(0, { name = string.format('Hydra%s', color), link = false })
)
name = string.format('HydraStatusLine%s', color)
api.nvim_set_hl(0, name, settings)
Expand Down