Something went wrong. Try again.
**[mirror]** Make your go dev experience better github.com/olexsmir/gopher.nvim
neovim golang
Something went wrong. Try again.
959 B · 39 lines
Lua
at main
12345678910111213141516171819202122232425262728293031323334353637383940---@diagnostic disable: undefined-global--# selene: allow(undefined_variable)
local okay, minidoc = pcall(require, "mini.doc")if not okay then error "mini.doc not found, please install it. https://github.com/echasnovski/mini.doc" returnend
local files = { "lua/gopher/init.lua", "lua/gopher/config.lua", "plugin/gopher.lua", "lua/gopher/struct_tags.lua", "lua/gopher/json2go.lua", "lua/gopher/impl.lua", "lua/gopher/gotests.lua", "lua/gopher/new.lua", "lua/gopher/iferr.lua", "lua/gopher/comment.lua",}
minidoc.setup()
local hooks = vim.deepcopy(minidoc.default_hooks)hooks.write_pre = function(lines) -- Remove first two lines with `======` and `------` delimiters to comply -- with `:h local-additions` template table.remove(lines, 1) table.remove(lines, 1)
return linesend
hooks.sections["@dochide"] = function(s) s.parent:clear_lines()end
MiniDoc.generate(files, "doc/gopher.nvim.txt", { hooks = hooks })