diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-01-20 10:07:25 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-01-20 10:07:25 -0700 |
commit | efeb9b5f9f6aac86332c4c4ec646720f9c500a48 (patch) | |
tree | a7b80587b7d991f635389c8e4925098e34c6a843 /lua | |
parent | 2bed3702371c1a024d310b2928761922d661df9e (diff) | |
download | config.vim-efeb9b5f9f6aac86332c4c4ec646720f9c500a48.tar.gz config.vim-efeb9b5f9f6aac86332c4c4ec646720f9c500a48.tar.bz2 config.vim-efeb9b5f9f6aac86332c4c4ec646720f9c500a48.zip |
Change confirm mapping to <Tab> rather than <Enter>
I find it more intuitive and I'm less liable to hit tab while typing
than enter anyway.
Diffstat (limited to 'lua')
-rw-r--r-- | lua/lsp.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lua/lsp.lua b/lua/lsp.lua index 3e01073..c443788 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -60,7 +60,6 @@ cmp.setup({ ["<C-u>"] = cmp.mapping.scroll_docs(4), ["<C-e>"] = cmp.mapping.close(), ["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), - ["<C-m>"] = cmp.mapping.confirm({ select = true }), ["<C-n>"] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() @@ -78,7 +77,7 @@ cmp.setup({ ["<Tab>"] = cmp.mapping(function(fallback) if cmp.visible() then - cmp.mapping.confirm({ select = true }) + cmp.mapping.confirm({ select = true })() elseif vim.fn["vsnip#available"](1) == 1 then feedkey("<Plug>(vsnip-expand-or-jump)", "") elseif has_words_before() then |