--[ -- Quick add matching pair of a somes characters. --] return { "windwp/nvim-autopairs", enabled = true, event = { "InsertEnter" }, dependencies = { "hrsh7th/nvim-cmp", -- Why ?! }, config = function() local autopairs = require("nvim-autopairs") autopairs.setup({ check_ts = true, -- ts is for treesitter ts_config = { lua = { "string" }, -- Don't add pairs in lua string treesitter nodes. javascript = { "template_string" }, -- Don't add pairs in JS template template_string treesitter nodes. java = false, }, }) local cmp_autopairs = require("nvim-autopairs.completion.cmp") local cmp = require("cmp") -- Makes autopairs and completion work together. cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) end, }