diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index c42ce8a..d98e0d7 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -38,8 +38,8 @@ return { cmp.setup({ formatting = { format = require('lspkind').cmp_format({ - mode = 'symbol_text', -- show only symbol annotations - maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) + mode = 'symbol_text', -- show only symbol annotations + maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) }) }, @@ -82,11 +82,13 @@ return { end, }, sources = { - { name = 'luasnip', priority = 8 }, - { name = 'nvim_lsp', priority = 7 }, + { name = 'luasnip', priority = 8 }, + { name = 'nvim_lsp', priority = 7 }, { name = 'nvim_lsp_signature_help', priority = 7 }, - { name = 'treesitter', priority = 6 }, - { name = 'buffer', priority = 5, + { name = 'treesitter', priority = 6 }, + { + name = 'buffer', + priority = 5, option = { get_bufnrs = function() local bufs = {}