refactor(ts_utils): i dont know why event it was here

This commit is contained in:
Oleksandr Smirnov 2025-03-05 16:20:22 +02:00
parent f171953e43
commit b580829379
No known key found for this signature in database
2 changed files with 23 additions and 35 deletions

View file

@ -9,25 +9,25 @@ local function generate(row, col)
local ts_utils = require "gopher._utils.ts"
local comment, ns = nil, nil
ns = ts_utils.get_package_node_at_pos(row, col, nil, false)
ns = ts_utils.get_package_node_at_pos(row, col, nil)
if ns ~= nil then
comment = "// Package " .. ns.name .. " provides " .. ns.name
return comment, ns
end
ns = ts_utils.get_struct_node_at_pos(row, col, nil, false)
ns = ts_utils.get_struct_node_at_pos(row, col, nil)
if ns ~= nil then
comment = "// " .. ns.name .. " " .. ns.type .. " "
return comment, ns
end
ns = ts_utils.get_func_method_node_at_pos(row, col, nil, false)
ns = ts_utils.get_func_method_node_at_pos(row, col, nil)
if ns ~= nil then
comment = "// " .. ns.name .. " " .. ns.type .. " "
return comment, ns
end
ns = ts_utils.get_interface_node_at_pos(row, col, nil, false)
ns = ts_utils.get_interface_node_at_pos(row, col, nil)
if ns ~= nil then
comment = "// " .. ns.name .. " " .. ns.type .. " "
return comment, ns