Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
You fixed this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
my cmp format code:
format = function(entry, vim_item) local lspkind_icons = { Text = '', Method = '', Function = '', Constructor = '', Field = 'ﰠ', Variable = '', Class = 'ﴯ', Interface = '', Module = '', Property = 'ﰠ', Unit = '塞', Value = '', Enum = '', Keyword = '', Snippet = '', Color = '', File = '', Reference = '', Folder = '', EnumMember = '', Constant = '', Struct = 'פּ', Event = '', Operator = '', TypeParameter = ' ', Robot = 'ﮧ', Smiley = 'ﲃ', Note = ' ', } local meta_type = vim_item.kind -- load lspkind icons - vim_item.kind = lspkind_icons[vim_item.kind] .. '' if entry.source.name == 'cmp_tabnine' then vim_item.kind = lspkind_icons['Robot'] -- vim_item.kind_hl_group = "CmpItemKindTabnine" end if entry.source.name == 'emoji' then vim_item.kind = lspkind_icons['Smiley'] vim_item.kind_hl_group = 'CmpItemKindEmoji' end if entry.source.name == 'look' then vim_item.kind = lspkind_icons['Note'] -- vim_item.kind_hl_group = "CmpItemKindEmoji" end vim_item.menu = ({ buffer = '[Buffer]', nvim_lsp = meta_type, path = '[Path]', luasnip = '[LuaSnip]', cmp_tabnine = '[TN]', emoji = '[Emoji]', look = '[Dict]', })[entry.source.name] return vim_item end,
Beta Was this translation helpful? Give feedback.
All reactions