feat: add autopairs plugin

This commit is contained in:
Carlos Hurtado 2024-04-30 20:32:34 -06:00
parent dc8b2f78e0
commit 4a1e2eacc8
1 changed files with 14 additions and 0 deletions

View File

@ -252,6 +252,20 @@ require('lazy').setup({
-- This is equivalent to: -- This is equivalent to:
-- require('Comment').setup({}) -- require('Comment').setup({})
-- autopairs to close pairs
{
'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,
},
-- "gc" to comment visual regions/lines -- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} }, { 'numToStr/Comment.nvim', opts = {} },