From fff745c4006d719cb84afe665c49713111bcb4f6 Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 22 Sep 2023 17:07:35 +0200 Subject: up --- .config/nvim/after/plugin/lsp.lua | 51 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) (limited to '.config/nvim/after/plugin/lsp.lua') diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index 1d85a9d..9f84855 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -47,6 +47,53 @@ local cmp_mappings = lsp.defaults.cmp_mappings({ [''] = cmp.mapping.complete(), }) --- lsp.set_preferences({ + +lsp.set_preferences({ -- sign_icons = { } --- }) + + sign_icons = { + 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 = "", + }, +}) + +local lspkind = require('lspkind') +cmp.setup { + + formatting = { + format = lspkind.cmp_format({ + mode = 'symbol', -- show only symbol annotations + maxwidth = 50, -- 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) + + -- The function below will be called before any actual modifications from lspkind + -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30)) + before = function (entry, vim_item) + return vim_item + end + }) + } +} -- cgit v1.2.3