feat(nvim): add nvim-autopairs

This commit is contained in:
Oliver Davies 2022-01-05 00:21:27 +00:00
parent b80396b0dd
commit e11cf61218
3 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,4 @@
require("opdavies.autopairs")
require("opdavies.colours") require("opdavies.colours")
require("opdavies.comment") require("opdavies.comment")
require("opdavies.completion") require("opdavies.completion")

View file

@ -0,0 +1,16 @@
local status_ok, autopairs = pcall(require, "nvim-autopairs")
if not status_ok then
return
end
autopairs.setup {}
local cmp_status_ok, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp")
if not cmp_status_ok then
return
end
local cmp = require('cmp')
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({
map_char = { tex = '' }
}))

View file

@ -33,6 +33,7 @@ return packer.startup(function()
use 'tpope/vim-surround' use 'tpope/vim-surround'
use 'vim-test/vim-test' use 'vim-test/vim-test'
use 'voldikss/vim-floaterm' use 'voldikss/vim-floaterm'
use 'windwp/nvim-autopairs'
use { 'mg979/vim-visual-multi', branch = 'master' } use { 'mg979/vim-visual-multi', branch = 'master' }
-- Themes -- Themes