3 files changed,
6 insertions(+),
5 deletions(-)
Author:
Smirnov Oleksandr
ss2316544@gmail.com
Committed at:
2022-09-22 18:20:37 +0300
Parent:
aa535e7
M
.github/workflows/ci.yml
@@ -10,6 +10,7 @@ - uses: actions/checkout@v2
- uses: JohnnyMorganz/stylua-action@1.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} + version: 0.14.0 args: --check . lint:
M
lua/gopher/comment.lua
@@ -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