+1
.github/workflows/ci.yml
+1
.github/workflows/ci.yml
+4
-4
lua/gopher/comment.lua
+4
-4
lua/gopher/comment.lua
···
4
4
local comment, ns = nil, nil
5
5
6
6
ns = ts_utils.get_package_node_at_pos(row, col)
7
-
if ns ~= nil and ns ~= {} then
7
+
if ns ~= nil then
8
8
comment = "// Package " .. ns.name .. " provides " .. ns.name
9
9
return comment, ns
10
10
end
11
11
12
12
ns = ts_utils.get_struct_node_at_pos(row, col)
13
-
if ns ~= nil and ns ~= {} then
13
+
if ns ~= nil then
14
14
comment = "// " .. ns.name .. " " .. ns.type .. " "
15
15
return comment, ns
16
16
end
17
17
18
18
ns = ts_utils.get_func_method_node_at_pos(row, col)
19
-
if ns ~= nil and ns ~= {} then
19
+
if ns ~= nil then
20
20
comment = "// " .. ns.name .. " " .. ns.type .. " "
21
21
return comment, ns
22
22
end
23
23
24
24
ns = ts_utils.get_interface_node_at_pos(row, col)
25
-
if ns ~= nil and ns ~= {} then
25
+
if ns ~= nil then
26
26
comment = "// " .. ns.name .. " " .. ns.type .. " "
27
27
return comment, ns
28
28
end