12345678910111213141516171819202122232425262728293031323334 |
- -- 配置自动tag 包括 下列内容
- return {
- 'echasnovski/mini.pairs',
- version = false,
- config = function()
- require("mini.pairs").setup({
- {
- -- In which modes mappings from this `config` should be created
- modes = { insert = true, command = false, terminal = false },
- -- Global mappings. Each right hand side should be a pair information, a
- -- table with at least these fields (see more in |MiniPairs.map|):
- -- - <action> - one of 'open', 'close', 'closeopen'.
- -- - <pair> - two character string for pair to be used.
- -- By default pair is not inserted after `\`, quotes are not recognized by
- -- `<CR>`, `'` does not insert pair after a letter.
- -- Only parts of tables can be tweaked (others will use these defaults).
- mappings = {
- ['('] = { action = 'open', pair = '()', neigh_pattern = '[^\\].' },
- ['['] = { action = 'open', pair = '[]', neigh_pattern = '[^\\].' },
- ['{'] = { action = 'open', pair = '{}', neigh_pattern = '[^\\].' },
- [')'] = { action = 'close', pair = '()', neigh_pattern = '[^\\].' },
- [']'] = { action = 'close', pair = '[]', neigh_pattern = '[^\\].' },
- ['}'] = { action = 'close', pair = '{}', neigh_pattern = '[^\\].' },
- ['"'] = { action = 'closeopen', pair = '""', neigh_pattern = '[^\\].', register = { cr = false } },
- ["'"] = { action = 'closeopen', pair = "''", neigh_pattern = '[^%a\\].', register = { cr = false } },
- ['`'] = { action = 'closeopen', pair = '``', neigh_pattern = '[^\\].', register = { cr = false } },
- },
- }
- })
- end
- }
|