nvim: fix nvim-cmp path (hopefully for good now?)

This commit is contained in:
PowerUser64 2022-07-27 02:20:33 -07:00
parent 650cd0a4c1
commit 69238a80ef

View file

@ -153,7 +153,7 @@ M.cmp = function()
formatting = { formatting = {
format = function(entry, vim_item) format = function(entry, vim_item)
-- fancy icons and a name of kind -- fancy icons and a name of kind
format = require('lspkind').cmp_format({ require('lspkind').cmp_format({
mode = 'symbol', -- show only symbol annotations mode = 'symbol', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
@ -200,13 +200,13 @@ M.cmp = function()
cmp.setup.cmdline('/', search_config) cmp.setup.cmdline('/', search_config)
cmp.setup.cmdline('?', search_config) cmp.setup.cmdline('?', search_config)
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -- `:` cmdline setup.
cmp.setup.cmdline(':', { cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(), mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'cmdline' }
}, {
{ name = 'path' } { name = 'path' }
}, {
{ name = 'cmdline' }
}) })
}) })
end -- <<< end -- <<<