[nvim] new plugin : autopairs

This commit is contained in:
David JULIEN 2021-10-30 15:29:14 +02:00
parent 73ac47a773
commit a532830d77
2 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,7 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
@ -17,6 +18,9 @@ local check_backspace = function()
sub(col, col):match('%s') == nil
end
-- If you want insert `(` after select function or method item
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
cmp.setup {
completion = {
autocomplete = false

View File

@ -86,6 +86,12 @@ return require("packer").startup(function()
config = function() require("plugin.comment") end
}
-- autopairs
use {
"windwp/nvim-autopairs",
config = function() require('nvim-autopairs').setup() end
}
-- display colors directly in editor
use {
"norcalli/nvim-colorizer.lua",