plugins.nvim-surround.settings.surrounds.<name>.change
An attribute set with two keys: target
and replacement
.
Type: null or (submodule)
Default:
null
plugins.nvim-surround.settings.surrounds.change.replacement
A function that returns the surrounding pair to replace the target selections.
Type: raw lua code
Example:
{
__raw = ''
function()
local result = M.get_input("Enter the function name: ")
if result then
return { { result }, { "" } }
end
end
'';
}
plugins.nvim-surround.settings.surrounds.change.target
A function that returns the pair of selections to be replaced in the buffer when changing the surrounding pair. It can also be a string which is interpreted as a Lua pattern whose match groups represent the left/right delimiter pair.
Type: string or raw lua code
Example:
"^<([^>]*)().-([^%/]*)()>$"