aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-04-22 16:56:49 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-04-22 16:56:49 +0200
commit89ac0b5773c1e032160732acb6a8b3dc779e2295 (patch)
tree994a6330462228fe48345725641b4a90d63febff /nvim/lua/plugins
parentd43bb7b867cdcc85b4e2a576aff9ca8e96a83e13 (diff)
downloaddotfiles-89ac0b5773c1e032160732acb6a8b3dc779e2295.tar.gz
add auto brackets
Diffstat (limited to 'nvim/lua/plugins')
-rw-r--r--nvim/lua/plugins/completion.lua10
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',