From eba032f30708e01a4a298370dcd634f9cdbcf639 Mon Sep 17 00:00:00 2001 From: Rofelson Date: Mon, 5 Jun 2023 22:42:16 +0000 Subject: [PATCH] add autopair plugin --- lua/custom/plugins/autopair.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lua/custom/plugins/autopair.lua diff --git a/lua/custom/plugins/autopair.lua b/lua/custom/plugins/autopair.lua new file mode 100644 index 00000000..d271227f --- /dev/null +++ b/lua/custom/plugins/autopair.lua @@ -0,0 +1,15 @@ +return { + "windwp/nvim-autopairs", + -- 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, +}