Skip to content

Commit

Permalink
refactor(plugins): change style of displaying source mapping in cmp
Browse files Browse the repository at this point in the history
  • Loading branch information
ecosse3 committed May 15, 2022
1 parent 13ccc51 commit 72d2a74
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lua/plugins/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ end

-- Setup
local source_mapping = {
buffer = EcoVim.icons.buffer .. '[BUF]',
buffer = EcoVim.icons.buffer .. 'BUF',
calc = EcoVim.icons.calculator,
cmp_tabnine = EcoVim.icons.light,
luasnip = EcoVim.icons.snippet,
npm = EcoVim.icons.terminal .. '[NPM]',
nvim_lsp = EcoVim.icons.paragraph .. '[LSP]',
luasnip = EcoVim.icons.snippet .. 'SNP',
npm = EcoVim.icons.terminal .. 'NPM',
nvim_lsp = EcoVim.icons.paragraph .. 'LSP',
nvim_lua = EcoVim.icons.bomb,
path = EcoVim.icons.folderOpen2,
treesitter = EcoVim.icons.tree,
zsh = EcoVim.icons.terminal .. '[ZSH]',
zsh = EcoVim.icons.terminal .. 'ZSH',
}

local buffer_option = {
Expand Down Expand Up @@ -102,7 +102,9 @@ cmp.setup {

if entry.source.name == 'cmp_tabnine' then
if entry.completion_item.data ~= nil and entry.completion_item.data.detail ~= nil then
menu = menu .. '[' .. entry.completion_item.data.detail .. ']'
menu = menu .. entry.completion_item.data.detail
else
menu = menu .. 'TBN'
end
end

Expand Down

0 comments on commit 72d2a74

Please sign in to comment.