nvim: add new surroundings
This commit is contained in:
parent
18b68dc8b5
commit
3e9bfd0466
|
@ -92,11 +92,26 @@ return {
|
|||
"echasnovski/mini.surround",
|
||||
optional = true,
|
||||
opts = {
|
||||
highlight_duration = 0,
|
||||
custom_surroundings = {
|
||||
B = {
|
||||
input = { "{{ ().*() }}" },
|
||||
output = { left = "{{ ", right = " }}" },
|
||||
},
|
||||
M = {
|
||||
input = { "{% ().*() %}" },
|
||||
output = { left = "{% ", right = " %}" },
|
||||
},
|
||||
T = {
|
||||
input = { "%f[%w_%.][%w_%.]+%b<>", "^.-<().*()>$" },
|
||||
output = function()
|
||||
local type_name = require("mini.surround").user_input("Type name")
|
||||
if type_name == nil then
|
||||
return nil
|
||||
end
|
||||
return { left = ("%s<"):format(type_name), right = ">" }
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue