diff options
| author | Robert Günzler <r@gnzler.io> | 2022-06-15 04:48:37 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-06-15 04:48:37 +0200 |
| commit | 81db33274b3119089873487a04a9ee00b1c4ea4f (patch) | |
| tree | 79bdcb775077be86aef6c9603113d2913c69776c /.vim | |
| parent | 844606b0c499926afa8a7f473433cd5b6bd73562 (diff) | |
vim: drop lspkind, vendor in symbol mapping
Diffstat (limited to '.vim')
| -rw-r--r-- | .vim/lua/lsp.lua | 37 | ||||
| -rw-r--r-- | .vim/lua/plugins.lua | 44 |
2 files changed, 48 insertions, 33 deletions
diff --git a/.vim/lua/lsp.lua b/.vim/lua/lsp.lua index 530a49e..84ba548 100644 --- a/.vim/lua/lsp.lua +++ b/.vim/lua/lsp.lua @@ -260,6 +260,43 @@ local format = function(afile) end end +local symbols = { + -- + Array = ' ', + Boolean = ' ', + Class = ' ', + Color = ' ', + Constant = ' ', + Constructor = ' ', + Enum = ' ', + EnumMember = ' ', + Event = ' ', + -- Field = ' ', + Field = ' ', + File = ' ', + Folder = ' ', + Function = ' ', + Interface = ' ', + Key = ' ', + Keyword = ' ', + Method = ' ', + Module = ' ', + Namespace = ' ', + Null = ' ', + Object = ' ', + Operator = ' ', + Property = ' ', + Package = ' ', + Reference = ' ', + Snippet = ' ', + Struct = ' ', + Text = ' ', + TypeParameter = ' ', + Unit = ' ', + Value = ' ', + Variable = ' ', +} + return { my_attach = my_attach, my_exit = my_exit, diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua index 1ec5df0..b3cfb1f 100644 --- a/.vim/lua/plugins.lua +++ b/.vim/lua/plugins.lua @@ -350,6 +350,9 @@ require('packer').startup({function() end} -- }}} use {'neovim/nvim-lspconfig', -- {{{ + require = { + 'nvim-lua/lsp-status.nvim', + }, config = function() require('lsp').setup() end} -- }}} @@ -437,8 +440,8 @@ require('packer').startup({function() 'hrsh7th/cmp-nvim-lsp-signature-help', 'saadparwaiz1/cmp_luasnip', 'f3fora/cmp-spell', - 'onsails/lspkind-nvim', 'windwp/nvim-autopairs', + 'neovim/nvim-lspconfig', }, config = function() local cmp = require('cmp') @@ -547,9 +550,8 @@ require('packer').startup({function() }), formatting = { fields = {'kind', 'abbr', 'menu'}, - format = require('lspkind').cmp_format { - mode = 'symbol', - menu = { + format = function(entry, item) + local menus = { nvim_lsp = '░ lsp', luasnip = '░ snip', nvim_lua = '░ nvim', @@ -557,35 +559,11 @@ require('packer').startup({function() 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 = '() ', - }, - }, + } + item.kind = package.loaded.lsp.symbols[item.kind] or '' + item.menu = menus[entry.source.name] + return item + end, }, } cmp.setup.cmdline('/', { |