From c4ecb304ccb536b28c2536224760689f283d3c23 Mon Sep 17 00:00:00 2001 From: Kerry Staley <35789718+kgstaley@users.noreply.github.com> Date: Tue, 19 Mar 2024 17:59:56 -0700 Subject: [PATCH] add autopairs --- lua/custom/plugins/autopairs.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lua/custom/plugins/autopairs.lua diff --git a/lua/custom/plugins/autopairs.lua b/lua/custom/plugins/autopairs.lua new file mode 100644 index 00000000..3036aa95 --- /dev/null +++ b/lua/custom/plugins/autopairs.lua @@ -0,0 +1,12 @@ +return { + 'windwp/nvim-autopairs', + -- optional deps + 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, +}