From 8767a17b5e6087153494a5cd30e5ae0c5165c9af Mon Sep 17 00:00:00 2001 From: Philippe Richard Date: Sun, 2 Oct 2022 23:48:23 -0400 Subject: feat: move icons to a single icons file (#3115) --- lua/lvim/core/cmp.lua | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) (limited to 'lua/lvim/core/cmp.lua') diff --git a/lua/lvim/core/cmp.lua b/lua/lvim/core/cmp.lua index a6362aa7..319bdc64 100644 --- a/lua/lvim/core/cmp.lua +++ b/lua/lvim/core/cmp.lua @@ -141,33 +141,7 @@ M.config = function() formatting = { fields = { "kind", "abbr", "menu" }, max_width = 0, - kind_icons = { - Class = " ", - Color = " ", - Constant = "ﲀ ", - Constructor = " ", - Enum = "練", - EnumMember = " ", - Event = " ", - Field = " ", - File = "", - Folder = " ", - Function = " ", - Interface = "ﰮ ", - Keyword = " ", - Method = " ", - Module = " ", - Operator = "", - Property = " ", - Reference = " ", - Snippet = " ", - Struct = " ", - Text = " ", - TypeParameter = " ", - Unit = "塞", - Value = " ", - Variable = " ", - }, + kind_icons = lvim.icons.kind, source_names = { nvim_lsp = "(LSP)", emoji = "(Emoji)", @@ -189,7 +163,7 @@ M.config = function() format = function(entry, vim_item) local max_width = lvim.builtin.cmp.formatting.max_width if max_width ~= 0 and #vim_item.abbr > max_width then - vim_item.abbr = string.sub(vim_item.abbr, 1, max_width - 1) .. "…" + vim_item.abbr = string.sub(vim_item.abbr, 1, max_width - 1) .. lvim.icons.ui.Ellipsis end if lvim.use_icons then vim_item.kind = lvim.builtin.cmp.formatting.kind_icons[vim_item.kind] -- cgit v1.2.3