code format cmp.lua
This commit is contained in:
parent
4240bd1bde
commit
6e3a2f931c
@ -38,8 +38,8 @@ return {
|
|||||||
cmp.setup({
|
cmp.setup({
|
||||||
formatting = {
|
formatting = {
|
||||||
format = require('lspkind').cmp_format({
|
format = require('lspkind').cmp_format({
|
||||||
mode = 'symbol_text', -- show only symbol annotations
|
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)
|
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)
|
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,
|
end,
|
||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'luasnip', priority = 8 },
|
{ name = 'luasnip', priority = 8 },
|
||||||
{ name = 'nvim_lsp', priority = 7 },
|
{ name = 'nvim_lsp', priority = 7 },
|
||||||
{ name = 'nvim_lsp_signature_help', priority = 7 },
|
{ name = 'nvim_lsp_signature_help', priority = 7 },
|
||||||
{ name = 'treesitter', priority = 6 },
|
{ name = 'treesitter', priority = 6 },
|
||||||
{ name = 'buffer', priority = 5,
|
{
|
||||||
|
name = 'buffer',
|
||||||
|
priority = 5,
|
||||||
option = {
|
option = {
|
||||||
get_bufnrs = function()
|
get_bufnrs = function()
|
||||||
local bufs = {}
|
local bufs = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user