[nvim] new plugin : autopairs

dev
David JULIEN 11 months ago
parent 73ac47a773
commit a532830d77
  1. 4
      .config/nvim/lua/plugin/cmp.lua
  2. 6
      .config/nvim/lua/plugins.lua

@ -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

@ -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",

Loading…
Cancel
Save