summaryrefslogtreecommitdiff
path: root/lua/core/cmp.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2021-10-03 16:13:46 +0200
committerGitHub <[email protected]>2021-10-03 16:13:46 +0200
commitd01ba08eaec1640ac2d038893525b3ba0af25813 (patch)
tree5edf2f5a12cedacb32f0c5d45ec2d999dacb99cd /lua/core/cmp.lua
parent3e1cd1ec235404ae96ed2d0756729cf44ae48f3e (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.lua30
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)",