neovim: update iferr snippet

This commit is contained in:
2025-06-11 22:20:20 +03:00
parent f4c4a66079
commit a8cca90ba8

View File

@@ -153,11 +153,9 @@ ls.add_snippets("go", {
local params = {}
for index = 0, return_type_node:child_count(), 1 do
local param = return_type_node:child(index)
if param then
if param:type() == "parameter_declaration" then
local text = ts_utils.get_node_text(param)
table.insert(params, text[1])
end
if param and param:type() == "parameter_declaration" then
local text = ts_utils.get_node_text(param)
table.insert(params, text[1])
end
end