[mirror] Make your go dev experience better github.com/olexsmir/gopher.nvim
neovim golang
1---@diagnostic disable: undefined-global 2--# selene: allow(undefined_variable) 3 4local okay, minidoc = pcall(require, "mini.doc") 5if not okay then 6 error "mini.doc not found, please install it. https://github.com/echasnovski/mini.doc" 7 return 8end 9 10local files = { 11 "lua/gopher/init.lua", 12 "lua/gopher/config.lua", 13 "plugin/gopher.lua", 14 "lua/gopher/struct_tags.lua", 15 "lua/gopher/impl.lua", 16 "lua/gopher/gotests.lua", 17 "lua/gopher/iferr.lua", 18 "lua/gopher/comment.lua", 19} 20 21minidoc.setup() 22 23local hooks = vim.deepcopy(minidoc.default_hooks) 24hooks.write_pre = function(lines) 25 -- Remove first two lines with `======` and `------` delimiters to comply 26 -- with `:h local-additions` template 27 table.remove(lines, 1) 28 table.remove(lines, 1) 29 30 return lines 31end 32 33MiniDoc.generate(files, "doc/gopher.nvim.txt", { hooks = hooks })