aboutsummaryrefslogtreecommitdiff
path: root/lua/kickstart/plugins/autopairs.lua
diff options
context:
space:
mode:
authorDamjan 9000 <damjan.9000@gmail.com>2024-04-17 23:08:09 +0200
committerDamjan 9000 <damjan.9000@gmail.com>2024-04-17 23:08:09 +0200
commit3d2daa7965e931b75679e435e91a49424d5168c2 (patch)
treedaf3d5d2afb803920c364cbe3a22421e7e16f54e /lua/kickstart/plugins/autopairs.lua
parentb6b33e61a49b162c22af5355239bfeca368dee1c (diff)
parent5e258d276fef52cc45a17021dc83a95748a0bc7f (diff)
Merge 'upstream' Move plugin examples from README to optional plugin files
Diffstat (limited to 'lua/kickstart/plugins/autopairs.lua')
-rw-r--r--lua/kickstart/plugins/autopairs.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/lua/kickstart/plugins/autopairs.lua b/lua/kickstart/plugins/autopairs.lua
new file mode 100644
index 0000000..87a7e5f
--- /dev/null
+++ b/lua/kickstart/plugins/autopairs.lua
@@ -0,0 +1,16 @@
+-- autopairs
+-- https://github.com/windwp/nvim-autopairs
+
+return {
+ 'windwp/nvim-autopairs',
+ event = 'InsertEnter',
+ -- Optional dependency
+ dependencies = { 'hrsh7th/nvim-cmp' },
+ config = function()
+ require('nvim-autopairs').setup {}
+ -- If you want to automatically add `(` after selecting a function or method
+ local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
+ local cmp = require 'cmp'
+ cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
+ end,
+}