1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-09-16 14:12:39 +00:00
dotfiles/.config/nvim/lua/plugins/autopairs.lua

23 lines
603 B
Lua
Raw Normal View History

2022-10-01 11:46:18 +00:00
-- Setup nvim-cmp.
2023-04-12 18:09:30 +00:00
require("nvim-autopairs").setup({
2022-10-12 14:02:54 +00:00
check_ts = true,
2022-10-08 10:44:11 +00:00
disable_filetype = { "TelescopePrompt", "neo-tree" },
ts_config = {
lua = { "string", "source" },
},
fast_wrap = {
map = "<M-e>",
chars = { "{", "[", "(", '"', "'" },
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
2022-10-12 14:02:54 +00:00
offset = 0,
2022-10-08 10:44:11 +00:00
end_key = "$",
keys = "qwertyuiopzxcvbnmasdfghjkl",
check_comma = true,
highlight = "PmenuSel",
highlight_grey = "LineNr",
},
2022-10-01 11:46:18 +00:00
})
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
2023-04-12 18:09:30 +00:00
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done({}))