51 lines
1.3 KiB
Lua
51 lines
1.3 KiB
Lua
return {
|
|
{
|
|
'gelguy/wilder.nvim',
|
|
config = function()
|
|
local wilder = require 'wilder'
|
|
wilder.setup {
|
|
modes = { ':', '/', '?' },
|
|
}
|
|
|
|
wilder.set_option('pipeline', {
|
|
wilder.branch(
|
|
{
|
|
wilder.check(function(_, x)
|
|
return vim.fn.empty(x)
|
|
end),
|
|
wilder.history(15),
|
|
},
|
|
wilder.cmdline_pipeline {
|
|
fuzzy = 1,
|
|
fuzzy_filter = wilder.vim_fuzzy_filter(),
|
|
},
|
|
wilder.search_pipeline()
|
|
),
|
|
})
|
|
wilder.set_option(
|
|
'renderer',
|
|
wilder.popupmenu_renderer {
|
|
highlighter = wilder.basic_highlighter(),
|
|
left = { ' ', wilder.popupmenu_devicons() },
|
|
right = { ' ', wilder.popupmenu_scrollbar() },
|
|
max_height = 15,
|
|
highlights = {
|
|
accent = wilder.make_hl('WilderAccent', 'Pmenu', { { a = 1 }, { a = 1 }, { foreground = '#7aa2f7' } }),
|
|
},
|
|
}
|
|
)
|
|
|
|
local map = function(keys, func)
|
|
vim.keymap.set('c', keys, function()
|
|
return wilder.in_context() and func() or keys
|
|
end, { noremap = true, expr = true })
|
|
end
|
|
|
|
map('<C-n>', wilder.next)
|
|
map('<C-p>', wilder.previous)
|
|
map('<C-j>', wilder.next)
|
|
map('<C-k>', wilder.previous)
|
|
end,
|
|
},
|
|
}
|