Use wilder
This commit is contained in:
parent
3e540ea509
commit
04b7e02f88
@ -37,22 +37,22 @@ cmp.setup({
|
||||
-- { name = 'snippy' }, -- For snippy users.
|
||||
{ name = "neorg" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
-- { name = "buffer" },
|
||||
}),
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline("/", {
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(":", {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
})
|
||||
-- cmp.setup.cmdline("/", {
|
||||
-- sources = {
|
||||
-- { name = "buffer" },
|
||||
-- },
|
||||
-- })
|
||||
--
|
||||
-- -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
-- cmp.setup.cmdline(":", {
|
||||
-- sources = cmp.config.sources({
|
||||
-- { name = "path" },
|
||||
-- }, {
|
||||
-- { name = "cmdline" },
|
||||
-- }),
|
||||
-- })
|
||||
|
@ -380,18 +380,23 @@ return require("packer").startup({
|
||||
end,
|
||||
})
|
||||
|
||||
-- Note Taking
|
||||
use({
|
||||
"nvim-neorg/neorg",
|
||||
config = function()
|
||||
require("plugins.configs._neorg")
|
||||
end,
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-neorg/neorg-telescope"
|
||||
},
|
||||
after = "nvim-treesitter"
|
||||
})
|
||||
-- Note Taking
|
||||
use({
|
||||
"nvim-neorg/neorg",
|
||||
config = function()
|
||||
require("plugins.configs._neorg")
|
||||
end,
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-neorg/neorg-telescope",
|
||||
},
|
||||
after = "nvim-treesitter",
|
||||
})
|
||||
|
||||
-- Completions for /, :, ?
|
||||
use({
|
||||
"gelguy/wilder.nvim",
|
||||
})
|
||||
|
||||
-- Leave at end!!!
|
||||
if packer_bootstrap then
|
||||
|
47
.config/nvim/plugin/wilder.vim
Normal file
47
.config/nvim/plugin/wilder.vim
Normal file
@ -0,0 +1,47 @@
|
||||
call wilder#enable_cmdline_enter()
|
||||
set wildcharm=<Tab>
|
||||
cmap <expr> <Tab> wilder#in_context() ? wilder#next() : "\<Tab>"
|
||||
cmap <expr> <S-Tab> wilder#in_context() ? wilder#previous() : "\<S-Tab>"
|
||||
call wilder#set_option('modes', ['/', '?', ':'])
|
||||
|
||||
call 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({
|
||||
\ 'fuzzy': 1,
|
||||
\ 'fuzzy_filter': wilder#vim_fuzzy_filter(),
|
||||
\ }),
|
||||
\ wilder#python_search_pipeline({
|
||||
\ 'pattern': 'fuzzy',
|
||||
\ }),
|
||||
\ ),
|
||||
\ ])
|
||||
|
||||
let s:highlighters = [
|
||||
\ wilder#pcre2_highlighter(),
|
||||
\ wilder#basic_highlighter(),
|
||||
\ ]
|
||||
|
||||
|
||||
call wilder#set_option('renderer', wilder#popupmenu_renderer(wilder#popupmenu_border_theme({
|
||||
\ 'highlighter': s:highlighters,
|
||||
\ 'highlights': {
|
||||
\ 'accent': wilder#make_hl('WilderAccent', 'Pmenu', [{}, {}, {'foreground': '#00b6ff'}]),
|
||||
\ },
|
||||
\ 'left': [
|
||||
\ wilder#popupmenu_devicons(),
|
||||
\ ],
|
||||
\ 'right': [
|
||||
\ ' ',
|
||||
\ wilder#popupmenu_scrollbar(),
|
||||
\ ],
|
||||
\ 'min_width': '30%',
|
||||
\ 'min_height': '0%',
|
||||
\ 'max_height': '50%',
|
||||
\ 'reverse': 1,
|
||||
\ 'border': 'rounded',
|
||||
\ })))
|
Loading…
Reference in New Issue
Block a user