feat(nvim): add nvim-autopairs
This commit is contained in:
parent
b80396b0dd
commit
e11cf61218
|
@ -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")
|
||||||
|
|
16
nvim/.config/nvim/lua/opdavies/autopairs.lua
Normal file
16
nvim/.config/nvim/lua/opdavies/autopairs.lua
Normal 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 = '' }
|
||||||
|
}))
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue