nvim: add new surroundings
This commit is contained in:
parent
e5b10dab80
commit
396d7196e5
1 changed files with 15 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue