onsails/lspkind.nvim

Formatting disappears upon navigating into the menu

hahuang65 opened this issue · 2 comments

While typing, the formatting shows up:

Screen Shot 2022-04-18 at 2 28 46 PM

But as soon as I press <C-n> to choose something, the formatting disappears (along with some options):

Screen Shot 2022-04-18 at 2 30 35 PM

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]"
      })
    }),
  },
})

Check out latest breaking changes on cmp (default mappings were removed).

Ah, that was it, thank you!