feat: add autopairs plugin
This commit is contained in:
parent
dc8b2f78e0
commit
4a1e2eacc8
14
init.lua
14
init.lua
|
@ -252,6 +252,20 @@ require('lazy').setup({
|
|||
-- This is equivalent to:
|
||||
-- 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
|
||||
{ 'numToStr/Comment.nvim', opts = {} },
|
||||
|
||||
|
|
Loading…
Reference in New Issue