autopairs.lua 498 B

12345678910111213141516
  1. -- autopairs
  2. -- https://github.com/windwp/nvim-autopairs
  3. return {
  4. 'windwp/nvim-autopairs',
  5. event = 'InsertEnter',
  6. -- Optional dependency
  7. dependencies = { 'hrsh7th/nvim-cmp' },
  8. config = function()
  9. require('nvim-autopairs').setup {}
  10. -- If you want to automatically add `(` after selecting a function or method
  11. local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
  12. local cmp = require 'cmp'
  13. cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
  14. end,
  15. }