added catpuccin
This commit is contained in:
@ -31,13 +31,6 @@ return {
|
||||
end
|
||||
|
||||
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)
|
||||
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
||||
})
|
||||
},
|
||||
mapping = {
|
||||
['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }),
|
||||
['<Down>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }),
|
||||
@ -94,7 +87,7 @@ return {
|
||||
{ name = 'luasnip', priority = 8 },
|
||||
{ name = 'nvim_lsp', priority = 7 },
|
||||
{ name = 'nvim_lsp_signature_help', priority = 7 },
|
||||
{ name = 'treesitter', priority = 6 },
|
||||
-- { name = 'treesitter', priority = 6 },
|
||||
{
|
||||
name = 'buffer',
|
||||
priority = 5,
|
||||
@ -122,10 +115,33 @@ return {
|
||||
or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches'
|
||||
or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover'
|
||||
end,
|
||||
completion = { completeopt = 'menu,menuone,noinsert, noselect' },
|
||||
-- completion = {
|
||||
-- completeopt = 'menu,menuone,noinsert, noselect',
|
||||
-- border = 'rounded',
|
||||
-- },
|
||||
window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
completion = cmp.config.window.bordered({
|
||||
col_offset = -3,
|
||||
side_padding = 0,
|
||||
winhighlight = 'Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None',
|
||||
}),
|
||||
documentation = cmp.config.window.bordered({
|
||||
winhighlight = 'Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None',
|
||||
}),
|
||||
},
|
||||
formatting = {
|
||||
fields = { 'kind', 'abbr', 'menu' },
|
||||
format = function(entry, vim_item)
|
||||
local kind = require('lspkind').cmp_format({
|
||||
mode = 'symbol_text',
|
||||
maxwidth = 50,
|
||||
})(entry, vim_item)
|
||||
local strings = vim.split(kind.kind, '%s', { trimempty = true })
|
||||
kind.kind = ' ' .. strings[1] .. ' '
|
||||
-- kind.menu = ' (' .. strings[2] .. ')'
|
||||
|
||||
return kind
|
||||
end,
|
||||
},
|
||||
sorting = {
|
||||
comparators = {
|
||||
|
Reference in New Issue
Block a user