mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-28 14:07:46 +01:00
nvim: updated wilder
This commit is contained in:
parent
f28be74fd9
commit
78bfabfc08
@ -14,33 +14,55 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
local wilder = require('wilder')
|
local wilder = require('wilder')
|
||||||
wilder.setup({
|
wilder.setup({
|
||||||
modes = { ':', '/', '?' },
|
modes = {':', '/', '?'},
|
||||||
accept_key = '<CR>',
|
accept_key = '<CR>',
|
||||||
reject_key = '<C-e>'
|
reject_key = '<C-e>'
|
||||||
})
|
})
|
||||||
wilder.set_option('renderer', wilder.popupmenu_renderer({
|
|
||||||
highlighter = wilder.basic_highlighter(),
|
|
||||||
left = { ' ', wilder.popupmenu_devicons() },
|
|
||||||
right = { ' ', wilder.popupmenu_scrollbar() },
|
|
||||||
}))
|
|
||||||
wilder.set_option('pipeline', {
|
wilder.set_option('pipeline', {
|
||||||
wilder.branch(
|
wilder.branch(
|
||||||
wilder.python_file_finder_pipeline({
|
wilder.python_file_finder_pipeline({
|
||||||
file_command = { 'find', '.', '-type', 'f', '-printf', '%P\n' },
|
file_command = function(ctx, arg)
|
||||||
dir_command = { 'find', '.', '-type', 'd', '-printf', '%P\n' },
|
if string.find(arg, '.') ~= nil then
|
||||||
filters = { 'fuzzy_filter', 'difflib_sorter' },
|
return {'fdfind', '-tf', '-H'}
|
||||||
|
else
|
||||||
|
return {'fdfind', '-tf'}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
dir_command = {'fd', '-td'},
|
||||||
|
filters = {'cpsm_filter'},
|
||||||
|
}),
|
||||||
|
wilder.substitute_pipeline({
|
||||||
|
pipeline = wilder.python_search_pipeline({
|
||||||
|
skip_cmdtype_check = 1,
|
||||||
|
pattern = wilder.python_fuzzy_pattern({
|
||||||
|
start_at_boundary = 0,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
}),
|
}),
|
||||||
wilder.cmdline_pipeline({
|
wilder.cmdline_pipeline({
|
||||||
language = 'python',
|
|
||||||
fuzzy = 2,
|
fuzzy = 2,
|
||||||
|
fuzzy_filter = wilder.lua_fzy_filter(),
|
||||||
}),
|
}),
|
||||||
|
{
|
||||||
|
wilder.check(function(ctx, x) return x == '' end),
|
||||||
|
wilder.history(),
|
||||||
|
},
|
||||||
wilder.python_search_pipeline({
|
wilder.python_search_pipeline({
|
||||||
pattern = wilder.python_fuzzy_pattern(),
|
pattern = wilder.python_fuzzy_pattern({
|
||||||
sorter = wilder.python_difflib_sorter(),
|
start_at_boundary = 0,
|
||||||
engine = 're',
|
}),
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
local highlighters = {
|
||||||
|
wilder.pcre2_highlighter(),
|
||||||
|
wilder.lua_fzy_highlighter(),
|
||||||
|
}
|
||||||
|
wilder.set_option('renderer', wilder.popupmenu_renderer({
|
||||||
|
highlighter = highlighters,
|
||||||
|
left = { ' ', wilder.popupmenu_devicons() },
|
||||||
|
right = { ' ', wilder.popupmenu_scrollbar() },
|
||||||
|
}))
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user