Don't use tab for autocomplete selection

This commit is contained in:
Oliver Hartmann 2021-09-16 22:50:19 +02:00
parent 879d60c37c
commit aebef6589d
2 changed files with 2 additions and 8 deletions

View File

@ -45,9 +45,7 @@ cmp.setup {
select = true
}),
["<Tab>"] = cmp.mapping(function(fallback)
if vim.fn.pumvisible() == 1 then
vim.api.nvim_feedkeys(t("<C-n>"), "n", true)
elseif luasnip.expand_or_jumpable() then
if luasnip.expand_or_jumpable() then
vim.api.nvim_feedkeys(t("<Plug>luasnip-expand-or-jump"), "", true)
else
fallback()
@ -57,9 +55,7 @@ cmp.setup {
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if vim.fn.pumvisible() == 1 then
vim.api.nvim_feedkeys(t("<C-p>"), "n", true)
elseif luasnip.jumpable(-1) then
if luasnip.jumpable(-1) then
vim.api.nvim_feedkeys(t("<Plug>luasnip-jump-prev"), "", true)
else
fallback()

View File

@ -55,8 +55,6 @@ utils.map('v', '<', '<gv')
utils.map('v', '>', '>gv')
-- Highlight word under cursor
utils.map('n', 'ü', ":let @/='\\<<C-R>=expand(\"<cword>\")<CR>\\>'<CR>:set hls<CR>", { noremap = true, silent = true })
utils.map('v', 'ü', "y:let @/='<C-R>=escape(@\",'/\\')<CR>'<CR>:set hls<CR>", { noremap = true, silent = true })
-- Close Buffer
utils.map('n', '<C-w>', ':bd<CR>')