docs: update

This commit is contained in:
Oleksandr Smirnov 2025-03-22 22:56:28 +02:00
parent 3b01af99c1
commit 0c0584edbd
No known key found for this signature in database
9 changed files with 83 additions and 95 deletions

View file

@ -1,7 +1,9 @@
---@toc_entry Generate comments
---@tag gopher.nvim-comments
---@usage Execute `:GoCmt` to generate a comment for the current function/method/struct/etc on this line.
---@text This module provides a way to generate comments for Go code.
---@text
--- This module provides a way to generate comments for Go code.
---
---@usage Set cursor on line with function/method/struct/etc and run `:GoCmt` to generate a comment.
local ts = require "gopher._utils.ts"
local log = require "gopher._utils.log"
@ -9,14 +11,14 @@ local comment = {}
---@param name string
---@return string
---@private
---@dochide
local function template(name)
return "// " .. name .. " "
end
---@param bufnr integer
---@return string
---@private
---@dochide
local function generate(bufnr)
local s_ok, s_res = pcall(ts.get_struct_under_cursor, bufnr)
if s_ok then