diff --git a/.config/nvim/lua/plugins/configs/cmp.lua b/.config/nvim/lua/plugins/configs/cmp.lua index 9902106b..7c43a39a 100644 --- a/.config/nvim/lua/plugins/configs/cmp.lua +++ b/.config/nvim/lua/plugins/configs/cmp.lua @@ -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" }, +-- }), +-- }) diff --git a/.config/nvim/lua/plugins/plugins.lua b/.config/nvim/lua/plugins/plugins.lua index efa19d74..9ef12a81 100755 --- a/.config/nvim/lua/plugins/plugins.lua +++ b/.config/nvim/lua/plugins/plugins.lua @@ -379,19 +379,24 @@ return require("packer").startup({ require("presence"):setup({}) 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 diff --git a/.config/nvim/plugin/wilder.vim b/.config/nvim/plugin/wilder.vim new file mode 100644 index 00000000..0a2c001b --- /dev/null +++ b/.config/nvim/plugin/wilder.vim @@ -0,0 +1,47 @@ +call wilder#enable_cmdline_enter() +set wildcharm= +cmap wilder#in_context() ? wilder#next() : "\" +cmap wilder#in_context() ? wilder#previous() : "\" +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', + \ })))