Formatting disappears upon navigating into the menu
hahuang65 opened this issue · 2 comments
hahuang65 commented
While typing, the formatting shows up:
But as soon as I press <C-n>
to choose something, the formatting disappears (along with some options):
This is my entire nvim-cmp
configuration:
local cmp = require'cmp'
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
mapping = {
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close()
}),
["<c-y>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
})
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'orgmode' },
{ name = 'nvim_lua' },
{ name = 'path' },
{ name = 'buffer', keyword_length = 5 },
},
experimental = {
native_menu = false,
ghost_text = true,
},
formatting = {
format = require'lspkind'.cmp_format({
with_text = true,
menu = ({
buffer = "[Buffer]",
nvim_lsp = "[LSP]",
nvim_lua = "[Lua]",
path = "[Path]"
})
}),
},
})
gegoune commented
Check out latest breaking changes on cmp (default mappings were removed).
hahuang65 commented
Ah, that was it, thank you!