chore: decouple wilder from common

This commit is contained in:
Matej Janezic 2023-05-20 00:57:59 +02:00
parent 08d8379bbe
commit be676d0b07
Signed by: janezicmatej
GPG Key ID: 4298E230ED37B2C0
2 changed files with 39 additions and 35 deletions

View File

@ -128,41 +128,6 @@ return {
end, end,
}, },
{
-- a more adventurous wildmenu
'gelguy/wilder.nvim',
dependencies = { 'romgrk/fzy-lua-native' },
config = function()
local wilder = require 'wilder'
wilder.setup { modes = { ':', '/', '?' } }
-- Disable Python remote plugin
wilder.set_option('use_python_remote_plugin', 0)
wilder.set_option('pipeline', {
wilder.branch(
wilder.cmdline_pipeline {
fuzzy = 1,
fuzzy_filter = wilder.lua_fzy_filter(),
},
wilder.vim_search_pipeline()
),
})
wilder.set_option(
'renderer',
wilder.popupmenu_renderer(wilder.popupmenu_border_theme {
highlights = {
border = 'Normal',
},
border = 'rounded',
highlighter = wilder.lua_fzy_highlighter(),
left = { ' ', wilder.popupmenu_devicons() },
right = { ' ', wilder.popupmenu_scrollbar() },
})
)
end,
},
{ {
'projekt0n/circles.nvim', 'projekt0n/circles.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' }, dependencies = { 'nvim-tree/nvim-web-devicons' },

39
lua/plugins/wilder.lua Normal file
View File

@ -0,0 +1,39 @@
return {
-- a more adventurous wildmenu
'gelguy/wilder.nvim',
dependencies = { 'romgrk/fzy-lua-native' },
config = function()
local wilder = require 'wilder'
wilder.setup { modes = { ':', '/', '?' } }
-- Disable Python remote plugin
wilder.set_option('use_python_remote_plugin', 0)
wilder.set_option('pipeline', {
wilder.branch(
wilder.cmdline_pipeline {
fuzzy = 1,
fuzzy_filter = wilder.lua_fzy_filter(),
},
wilder.vim_search_pipeline()
),
})
wilder.set_option(
'renderer',
wilder.popupmenu_renderer(wilder.popupmenu_border_theme {
highlights = {
border = 'Normal',
},
-- stylua: ignore
border = {
'', '', '',
'', '',
'', '', '',
},
highlighter = wilder.lua_fzy_highlighter(),
left = { ' ', wilder.popupmenu_devicons() },
right = { ' ', wilder.popupmenu_scrollbar() },
})
)
end,
}