docs: update (#103)

* chore: add @dochide annotation

- it's easier to distinguish @private and something i dont want to see in docs

* docs: update

* refactor: move thing out to utils

* fix: lua-ls error

* fixup! refactor: move thing out to utils

* docs: update
This commit is contained in:
Smirnov Oleksandr 2025-03-23 15:34:47 +02:00 committed by Oleksandr Smirnov
parent 592fe82760
commit c0b2834652
No known key found for this signature in database
13 changed files with 107 additions and 112 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