diff options
author | kylo252 <[email protected]> | 2021-10-03 16:13:46 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-03 16:13:46 +0200 |
commit | d01ba08eaec1640ac2d038893525b3ba0af25813 (patch) | |
tree | 5edf2f5a12cedacb32f0c5d45ec2d999dacb99cd /lua/core/cmp.lua | |
parent | 3e1cd1ec235404ae96ed2d0756729cf44ae48f3e (diff) |
refactor: auto-generate language configuration (#1584)
Refactor the monolithic `lvim.lang` design into a more modular approach.
IMPORTANT: run `:LvimUpdate` in order to generate the new ftplugin template files.
Diffstat (limited to 'lua/core/cmp.lua')
-rw-r--r-- | lua/core/cmp.lua | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/lua/core/cmp.lua b/lua/core/cmp.lua index 2bc724fb..965285c7 100644 --- a/lua/core/cmp.lua +++ b/lua/core/cmp.lua @@ -35,9 +35,35 @@ M.config = function() select = true, }, formatting = { + 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 = "īĻ ", + }, format = function(entry, vim_item) - local icons = require("lsp.kind").icons - vim_item.kind = icons[vim_item.kind] + vim_item.kind = lvim.builtin.cmp.formatting.kind_icons[vim_item.kind] vim_item.menu = ({ nvim_lsp = "(LSP)", emoji = "(Emoji)", |