Closed hahuang65 closed 2 years ago
While typing, the formatting shows up:
But as soon as I press <C-n> to choose something, the formatting disappears (along with some options):
<C-n>
This is my entire nvim-cmp configuration:
nvim-cmp
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]" }) }), }, })
Check out latest breaking changes on cmp (default mappings were removed).
Ah, that was it, thank you!
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: