diff options
Diffstat (limited to '.config/nvim/lua')
-rw-r--r-- | .config/nvim/lua/plugins/cmp.lua | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index 8e34264..097d413 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua | |||
@@ -73,25 +73,19 @@ return { | |||
73 | end, | 73 | end, |
74 | }, | 74 | }, |
75 | mapping = cmp.mapping.preset.insert({ | 75 | mapping = cmp.mapping.preset.insert({ |
76 | ["<C-f>"] = cmp.mapping.scroll_docs(-4), | 76 | ["<C-l>"] = cmp.mapping.confirm({ |
77 | ["<C-d>"] = cmp.mapping.scroll_docs(4), | ||
78 | ["<CR>"] = cmp.mapping.confirm({ | ||
79 | behavior = cmp.ConfirmBehavior.Replace, | 77 | behavior = cmp.ConfirmBehavior.Replace, |
80 | select = false, | 78 | select = true, |
81 | }), | 79 | }), |
82 | ["<Tab>"] = cmp.mapping(function(fallback) | 80 | ["<Tab>"] = cmp.mapping(function(fallback) |
83 | if cmp.visible() then | 81 | if luasnip.locally_jumpable(1) then |
84 | cmp.select_next_item() | 82 | luasnip.jump(1) |
85 | elseif luasnip.expand_or_jumpable() then | ||
86 | luasnip.expand_or_jump() | ||
87 | else | 83 | else |
88 | fallback() | 84 | fallback() |
89 | end | 85 | end |
90 | end, { "i", "s" }), | 86 | end, { "i", "s" }), |
91 | ["<S-Tab>"] = cmp.mapping(function(fallback) | 87 | ["<S-Tab>"] = cmp.mapping(function(fallback) |
92 | if cmp.visible() then | 88 | if luasnip.locally_jumpable(-1) then |
93 | cmp.select_prev_item() | ||
94 | elseif luasnip.jumpable(-1) then | ||
95 | luasnip.jump(-1) | 89 | luasnip.jump(-1) |
96 | else | 90 | else |
97 | fallback() | 91 | fallback() |