diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2024-04-22 16:56:49 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2024-04-22 16:56:49 +0200 |
commit | 89ac0b5773c1e032160732acb6a8b3dc779e2295 (patch) | |
tree | 994a6330462228fe48345725641b4a90d63febff /nvim | |
parent | d43bb7b867cdcc85b4e2a576aff9ca8e96a83e13 (diff) | |
download | dotfiles-89ac0b5773c1e032160732acb6a8b3dc779e2295.tar.gz |
add auto brackets
Diffstat (limited to 'nvim')
-rw-r--r-- | nvim/lazy-lock.json | 3 | ||||
-rw-r--r-- | nvim/lua/plugins/completion.lua | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index b25f6d6..530c1d8 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -5,7 +5,8 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, "gitsigns.nvim": { "branch": "main", "commit": "035da036e68e509ed158414416c827d022d914bd" }, - "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, + "lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" }, + "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, "nvim-hardline": { "branch": "main", "commit": "9b85ebfba065091715676fb440c16a37c465b9a5" }, "nvim-lspconfig": { "branch": "master", "commit": "ed8b8a15acc441aec669f97d75f2c1f2ac8c8aa5" }, 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', |