diff options
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/init.lua | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index e2afaf4..2481ec6 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -142,10 +142,45 @@ require("lspconfig").lua_ls.setup(lsp.nvim_lua_ls()) lsp.setup() -- [[ cmp setup ]] +local kind_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 = " ", +} + require("cmp").setup({ sources = { { name = "nvim_lsp" }, { name = "buffer" }, { name = "path" }, - } + }, + formatting = { + format = function(entry, vim_item) + vim_item.kind = kind_icons[vim_item.kind] .. " " .. string.lower(vim_item.kind) + vim_item.menu = "[" .. entry.source.name .. "]" + return vim_item + end + }, }) |