diff options
author | Joe <rrbo@proton.me> | 2023-09-22 17:07:35 +0200 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2023-09-22 17:07:35 +0200 |
commit | fff745c4006d719cb84afe665c49713111bcb4f6 (patch) | |
tree | 2b0a8d669d663a6a274a3d96779e1a65bdd5c4a3 /.config/nvim/after/plugin/lsp.lua | |
parent | up (diff) | |
download | dotfiles-bsd-fff745c4006d719cb84afe665c49713111bcb4f6.tar.gz dotfiles-bsd-fff745c4006d719cb84afe665c49713111bcb4f6.tar.bz2 dotfiles-bsd-fff745c4006d719cb84afe665c49713111bcb4f6.tar.xz dotfiles-bsd-fff745c4006d719cb84afe665c49713111bcb4f6.tar.zst dotfiles-bsd-fff745c4006d719cb84afe665c49713111bcb4f6.zip |
up
Diffstat (limited to '.config/nvim/after/plugin/lsp.lua')
-rw-r--r-- | .config/nvim/after/plugin/lsp.lua | 51 |
1 files changed, 49 insertions, 2 deletions
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({ ['<C-Space>'] = 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 + }) + } +} |