Skip to content

Commit c545c5c

Browse files
authored
Create autopairs.lua
1 parent 51187e5 commit c545c5c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
-- autopairs
2+
-- https://github.com/windwp/nvim-autopairs
3+
4+
return {
5+
'windwp/nvim-autopairs',
6+
event = 'InsertEnter',
7+
-- Optional dependency
8+
dependencies = { 'hrsh7th/nvim-cmp' },
9+
config = function()
10+
require('nvim-autopairs').setup {}
11+
-- If you want to automatically add `(` after selecting a function or method
12+
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
13+
local cmp = require 'cmp'
14+
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
15+
end,
16+
}

0 commit comments

Comments
 (0)