From d85ee2757c412e2df4d45d23d7fef88d0c66cfe0 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Tue, 8 Feb 2022 23:54:12 +0100 Subject: vim: prettify completion menu --- .vim/lua/plugins.lua | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) (limited to '.vim') diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua index 544b644..87c8514 100644 --- a/.vim/lua/plugins.lua +++ b/.vim/lua/plugins.lua @@ -313,6 +313,39 @@ return require('packer').startup({function() } end} -- }}} + use {'onsails/lspkind-nvim', -- {{{ + config = 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 = '', + } + } + end} -- }}} + use {'hrsh7th/nvim-cmp', -- {{{ requires = { 'hrsh7th/cmp-buffer', @@ -348,12 +381,28 @@ return require('packer').startup({function() { name = 'nvim_lsp' }, { name = 'snippy' }, { name = 'nvim_lua' }, + { name = 'neorg' }, { name = 'orgmode' }, - { name = 'spell' }, + { name = 'spell', keyword_length = 3, max_item_count = 10 }, { name = 'path' }, - { name = 'buffer' }, + { name = 'buffer', keyword_length = 3 }, + }, + formatting = { + format = require('lspkind').cmp_format { + with_text = false, + menu = { + nvim_lsp = '[lsp]', + snippy = '[snip]', + nvim_lua = '[nvim]', + orgmode = '[org]', + spell = '[spell]', + path = '[path]', + buffer = '[buf]', + } + } }, experimental = { + native_menu = false, -- ghost_text = { hl_group = 'Comment' } } } -- cgit 1.4.1