mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
feat(nvim): add gelguy/wilder.nvim
This commit is contained in:
31
config/nvim/lua/plugins/wilder.lua
Normal file
31
config/nvim/lua/plugins/wilder.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
-- A more adventurous wildmenu
|
||||
-- https://github.com/gelguy/wilder.nvim
|
||||
|
||||
return {
|
||||
'gelguy/wilder.nvim',
|
||||
config = function()
|
||||
local wilder = require('wilder')
|
||||
wilder.setup({ modes = { ':', '/', '?' } })
|
||||
|
||||
local gradient = {
|
||||
'#f4468f', '#fd4a85', '#ff507a', '#ff566f', '#ff5e63',
|
||||
'#ff6658', '#ff704e', '#ff7a45', '#ff843d', '#ff9036',
|
||||
'#f89b31', '#efa72f', '#e6b32e', '#dcbe30', '#d2c934',
|
||||
'#c8d43a', '#bfde43', '#b6e84e', '#aff05b'
|
||||
}
|
||||
|
||||
for i, fg in ipairs(gradient) do
|
||||
gradient[i] = wilder.make_hl('WilderGradient' .. i, 'Pmenu', { { a = 1 }, { a = 1 }, { foreground = fg } })
|
||||
end
|
||||
|
||||
wilder.set_option('renderer', wilder.popupmenu_renderer({
|
||||
highlights = {
|
||||
gradient = gradient, -- must be set
|
||||
-- selected_gradient key can be set to apply gradient highlighting for the selected candidate.
|
||||
},
|
||||
highlighter = wilder.highlighter_with_gradient({
|
||||
wilder.basic_highlighter(), -- or wilder.lua_fzy_highlighter(),
|
||||
}),
|
||||
}))
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user