mirror of
https://github.com/ilyakooo0/nvim-autopairs.git
synced 2024-09-11 15:26:37 +03:00
fix #258 add enable_abbr
This commit is contained in:
parent
d374efb7ec
commit
cc8f7569cc
@ -38,6 +38,7 @@ local enable_moveright = true
|
||||
local enable_afterquote = true -- add bracket pairs after quote
|
||||
local enable_check_bracket_line = true --- check bracket in same line
|
||||
local enable_bracket_in_quote = true --
|
||||
local enable_abbr = false -- trigger abbreviation
|
||||
local break_undo = true -- switch for basic rule break undo sequence
|
||||
local check_ts = false
|
||||
local map_cr = true
|
||||
|
@ -26,6 +26,7 @@ local default = {
|
||||
enable_afterquote = true,
|
||||
enable_check_bracket_line = true,
|
||||
enable_bracket_in_quote = true,
|
||||
enable_abbr = false,
|
||||
ts_config = {
|
||||
lua = { 'string', 'source' },
|
||||
javascript = { 'string', 'template_string' },
|
||||
@ -460,6 +461,9 @@ M.autopairs_map = function(bufnr, char)
|
||||
if rule.is_undo then
|
||||
result = utils.esc(utils.key.undo_sequence) .. result .. utils.esc(utils.key.undo_sequence)
|
||||
end
|
||||
if M.config.enable_abbr then
|
||||
result = utils.esc(utils.key.abbr) .. result
|
||||
end
|
||||
log.debug("key_map :" .. result)
|
||||
return result
|
||||
end
|
||||
|
@ -11,7 +11,8 @@ M.key = {
|
||||
join_left = "<c-g>U<left>",
|
||||
join_right = "<c-g>U<right>",
|
||||
undo_sequence = "<c-g>u",
|
||||
noundo_sequence = "<c-g>U"
|
||||
noundo_sequence = "<c-g>U",
|
||||
abbr = "<c-]>"
|
||||
}
|
||||
|
||||
M.set_vchar = function(text)
|
||||
|
Loading…
Reference in New Issue
Block a user