1
0
Fork 0

nvim: add new surroundings

This commit is contained in:
Luca Bilke 2024-06-30 12:07:01 +02:00
parent e5b10dab80
commit 396d7196e5

View file

@ -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,
},
},
},
},