Feat: add autopairs plugin
This commit is contained in:
		
							parent
							
								
									f35a57931a
								
							
						
					
					
						commit
						db2a24fc05
					
				| 
						 | 
				
			
			@ -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,
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue