Skip to content

Commit

Permalink
vim: Remove disabling of cmp's tab key mappings for the command mode
Browse files Browse the repository at this point in the history
Avoid a bug in hrsh7th/nvim-cmp#897; these lines are no longer needed
in newer versions of nvim-cmp due to removal of default key mappings.
  • Loading branch information
wookayin committed Apr 14, 2022
1 parent 95fce71 commit 14076ec
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nvim/lua/config/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -312,20 +312,18 @@ cmp.setup {
['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp_types.SelectBehavior.Insert }),
['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp_types.SelectBehavior.Insert }),
['<CR>'] = cmp.mapping.confirm({ select = false }),
['<Tab>'] = {
['<Tab>'] = { -- see GH-880, GH-897
i = function(fallback) -- see GH-231, GH-286
if cmp.visible() then cmp.select_next_item()
elseif has_words_before() then cmp.complete()
else fallback() end
end,
c = cmp.config.disable, -- see GH-880
},
['<S-Tab>'] = {
i = function(fallback)
if cmp.visible() then cmp.select_prev_item()
else fallback() end
end,
c = cmp.config.disable,
},
},
formatting = {
Expand Down

0 comments on commit 14076ec

Please sign in to comment.