.dotfiles/.config/nvim/after/plugin/autoclose.lua

25 lines
1.2 KiB
Lua
Raw Permalink Normal View History

require("autoclose").setup({
keys = {
["("] = { escape = false, close = true, pair = "()", disabled_filetypes = {} },
["["] = { escape = false, close = true, pair = "[]", disabled_filetypes = {} },
["{"] = { escape = false, close = true, pair = "{}", disabled_filetypes = {} },
[">"] = { escape = true, close = false, pair = "<>", disabled_filetypes = {} },
[")"] = { escape = true, close = false, pair = "()", disabled_filetypes = {} },
["]"] = { escape = true, close = false, pair = "[]", disabled_filetypes = {} },
["}"] = { escape = true, close = false, pair = "{}", disabled_filetypes = {} },
['"'] = { escape = true, close = true, pair = '""', disabled_filetypes = {"gitcommit", "tex", "asciidoc"} },
["'"] = { escape = true, close = true, pair = "''", disabled_filetypes = {"gitcommit", "tex", "asciidoc"} },
["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {"gitcommit", "tex", "asciidoc"} },
["$"] = { escape = true, close = true, pair = "$$", enabled_filetypes = {"tex"} },
},
options = {
disabled_filetypes = { "text" },
disable_when_touch = false,
pair_spaces = false,
auto_indent = true,
},
})