diff options
Diffstat (limited to 'nvim/lua')
-rw-r--r-- | nvim/lua/plugins/completion.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nvim/lua/plugins/completion.lua b/nvim/lua/plugins/completion.lua index 1a4ef7a..782536c 100644 --- a/nvim/lua/plugins/completion.lua +++ b/nvim/lua/plugins/completion.lua @@ -1,5 +1,9 @@ return { { + "windwp/nvim-autopairs", + event = "InsertEnter", + config = true + },{ "hrsh7th/nvim-cmp", dependencies = { 'hrsh7th/cmp-nvim-lsp', @@ -10,6 +14,7 @@ return { 'hrsh7th/vim-vsnip' }, config = function() + local cmp_autopairs = require'nvim-autopairs.completion.cmp' local cmp = require'cmp' cmp.setup { snippet = { @@ -33,6 +38,11 @@ return { { name = 'buffer' }, }) } + + cmp.event:on( + 'confirm_done', + cmp_autopairs.on_confirm_done() + ) end, },{ 'neovim/nvim-lspconfig', |