feat(nvim): add wilder as wildmenu replacement

main
mandlm 2024-07-13 20:13:08 +02:00
parent cc001c4844
commit d656f0dd8c
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
2 changed files with 36 additions and 0 deletions

View File

@ -16,6 +16,9 @@
vim-bbye vim-bbye
ansible-vim ansible-vim
# better wildmenu
wilder-nvim
# ui # ui
dressing-nvim dressing-nvim
@ -162,6 +165,7 @@
${builtins.readFile ./dap.lua } ${builtins.readFile ./dap.lua }
${builtins.readFile ./neorg.lua } ${builtins.readFile ./neorg.lua }
${builtins.readFile ./illuminate.lua } ${builtins.readFile ./illuminate.lua }
${builtins.readFile ./wilder.lua }
vim.g.gitblame_date_format = "%r" vim.g.gitblame_date_format = "%r"
EOF EOF

32
neovim/wilder.lua Normal file
View File

@ -0,0 +1,32 @@
local wilder = require('wilder')
wilder.setup({ modes = { ':', '/', '?' } })
wilder.set_option('pipeline', {
wilder.branch(
wilder.python_file_finder_pipeline({
file_command = { "rg", "--files" },
dir_command = { 'find', '.', '-type', 'd', '-printf', '%P\n' },
filters = { 'fuzzy_filter', 'difflib_sorter' },
}),
wilder.cmdline_pipeline({
language = "python",
fuzzy = 1,
}),
wilder.python_search_pipeline({
pattern = wilder.python_fuzzy_pattern(),
sorter = wilder.python_difflib_sorter(),
engine = 're',
})
)
})
-- Set renderer
wilder.set_option('renderer', wilder.popupmenu_renderer({
highlighter = wilder.basic_highlighter(),
left = { ' ', wilder.popupmenu_devicons() },
right = { ' ', wilder.popupmenu_scrollbar() },
pumblend = 20,
max_height = '15', -- Adjust the maximum height as needed
border = 'rounded', -- Border style can be 'single', 'double', etc.
}))