aboutsummaryrefslogtreecommitdiff
path: root/lua/user/cmp.lua
diff options
context:
space:
mode:
authorAleksa Vuckovic <aleksa@vuckovic.cc>2023-02-25 01:49:02 +0100
committerAleksa Vuckovic <aleksa@vuckovic.cc>2023-02-25 01:49:02 +0100
commite37e216a65a8b0df58dce366f50a4d8b896cde0b (patch)
tree258e141859e8b88276fc3553d307cc41f69e6550 /lua/user/cmp.lua
parent336b2de4b36ad9eafdef6c5e882bc08a66d7c959 (diff)
few small fixes
Diffstat (limited to 'lua/user/cmp.lua')
-rw-r--r--lua/user/cmp.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/lua/user/cmp.lua b/lua/user/cmp.lua
index bb475a3..3d7569b 100644
--- a/lua/user/cmp.lua
+++ b/lua/user/cmp.lua
@@ -16,7 +16,6 @@ local check_backspace = function()
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
end
---   פּ ﯟ   some other good icons
local kind_icons = {
Text = "",
Method = "m",
@@ -51,13 +50,13 @@ cmp.setup {
luasnip.lsp_expand(args.body) -- For `luasnip` users.
end,
},
+
mapping = {
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs( -1), { "i", "c" }),
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
- ["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
["<C-e>"] = cmp.mapping {
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
@@ -97,9 +96,7 @@ cmp.setup {
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
- -- Kind icons
- vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
- -- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
+ vim_item.kind = kind_icons[vim_item.kind]
vim_item.menu = ({
nvim_lsp = "[LSP]",
luasnip = "[Snippet]",