diff options
| author | Robert Günzler <r@gnzler.io> | 2022-05-27 13:02:25 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-05-27 13:16:15 +0200 |
| commit | 7b28e21ebed51653f785733f63391e36154bb004 (patch) | |
| tree | c0e5d59b064efd1678847bab1857c5d9b545601f /.vim/lua/plugins.lua | |
| parent | fd0ddda95e879b8f1924fb65136a5faa306ffa9b (diff) | |
vim: update cmp config
Diffstat (limited to '.vim/lua/plugins.lua')
| -rw-r--r-- | .vim/lua/plugins.lua | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua index 96b1e89..73f9034 100644 --- a/.vim/lua/plugins.lua +++ b/.vim/lua/plugins.lua @@ -463,7 +463,7 @@ return require('packer').startup({function() else fallback() end - end, { 'i', 's'}), + end, { 'c', 'i', 's'}), ['<c-p>'] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() @@ -472,7 +472,7 @@ return require('packer').startup({function() else fallback() end - end, { 'i', 's'}), + end, { 'c', 'i', 's'}), ['<tab>'] = cmp.mapping({ i = function(fallback) if cmp.visible() then @@ -527,24 +527,52 @@ return require('packer').startup({function() { name = 'nvim_lua' }, }, { { name = 'neorg' }, - { name = 'orgmode' }, + -- { name = 'orgmode' }, { name = 'spell', keyword_length = 3, max_item_count = 10 }, { name = 'path' }, { name = 'buffer', keyword_length = 3 }, }), formatting = { + fields = {'kind', 'abbr', 'menu'}, format = require('lspkind').cmp_format { - with_text = false, + mode = 'symbol', menu = { - nvim_lsp = '[lsp]', - luasnip = '[snip]', - nvim_lua = '[nvim]', - orgmode = '[org]', - spell = '[spell]', - path = '[path]', - buffer = '[buf]', - } - } + nvim_lsp = '░ lsp', + luasnip = '░ snip', + nvim_lua = '░ nvim', + -- orgmode = '░ org', + spell = '░ spell', + path = '░ path', + buffer = '░ buf', + }, + symbol_map = { + 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 = '() ', + }, + }, }, } cmp.setup.cmdline('/', { @@ -562,36 +590,6 @@ return require('packer').startup({function() }) }) - require('lspkind').init { - symbol_map = { - 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 = '', - } - } - -- insert `(` after selecting function/method items cmp.event:on('confirm_done', require('nvim-autopairs.completion.cmp').on_confirm_done { map_char = { tex = '' } |