Skip to content

Commit

Permalink
Update autocompletion bevavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasha Radchenko committed Apr 18, 2023
1 parent e68d379 commit 87209b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nvim/init.lua
Expand Up @@ -17,6 +17,7 @@ require('lazy').setup({
-- Git related plugins
'tpope/vim-fugitive',
'tpope/vim-rhubarb',
'dcampos/cmp-snippy',

-- Detect tabstop and shiftwidth automatically
'tpope/vim-sleuth',
Expand Down Expand Up @@ -333,6 +334,7 @@ mason_lspconfig.setup_handlers {
end,
}


-- nvim-cmp setup
local cmp = require 'cmp'
local luasnip = require 'luasnip'
Expand All @@ -354,6 +356,7 @@ cmp.setup {
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
luasnip.jump(-1)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
Expand Down

0 comments on commit 87209b0

Please sign in to comment.