parent
aa535e7ed1
commit
d65884b182
3 changed files with 6 additions and 5 deletions
|
|
@ -4,25 +4,25 @@ local function generate(row, col)
|
|||
local comment, ns = nil, nil
|
||||
|
||||
ns = ts_utils.get_package_node_at_pos(row, col)
|
||||
if ns ~= nil and ns ~= {} then
|
||||
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)
|
||||
if ns ~= nil and ns ~= {} then
|
||||
if ns ~= nil then
|
||||
comment = "// " .. ns.name .. " " .. ns.type .. " "
|
||||
return comment, ns
|
||||
end
|
||||
|
||||
ns = ts_utils.get_func_method_node_at_pos(row, col)
|
||||
if ns ~= nil and ns ~= {} then
|
||||
if ns ~= nil then
|
||||
comment = "// " .. ns.name .. " " .. ns.type .. " "
|
||||
return comment, ns
|
||||
end
|
||||
|
||||
ns = ts_utils.get_interface_node_at_pos(row, col)
|
||||
if ns ~= nil and ns ~= {} then
|
||||
if ns ~= nil then
|
||||
comment = "// " .. ns.name .. " " .. ns.type .. " "
|
||||
return comment, ns
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue