neovim: update iferr snippet

This commit is contained in:
2025-05-21 20:04:11 +03:00
parent 8bc87a9359
commit f188ec589d

View File

@@ -122,7 +122,7 @@ ls.add_snippets("go", {
fmt(
[[
if err != nil {
return <>
<>
}
]],
{
@@ -168,7 +168,12 @@ ls.add_snippets("go", {
}
local size = vim.tbl_count(params)
local x = {}
if size == 0 then
return sn(nil, { i(1) })
end
local x = { t("return ") }
for index, param in ipairs(params) do
local replace = rec[param]
if replace ~= nil then