* idk how good this idea is * this could be working but i still cant figure out how to run it * ignore tags that mini.doc gens, but why? * chore(taskfile): force exiting after tests because i got infinit ci * chore(ci): add more nvim versions to run on * chore: update taskfile * feat: add docs generator * docs: its only begining * refactor: update docgen script * docs: write some more * docs(config): update * docs: update readme * language * hope it would work * what about that? * maybe this would work? * update md * upd * WHY DOESNT IT WORKING * idk by but 0.9.3 just fails the ci, so i deleted it from suite * again update, why does markdown not work in embeded html * maybe it can help? * upd * again update * kinda fix * fix: formatting * again some updating * some readme updating * fix, this shouldnt be in repo * i finnaly undertood how to fix this fking skill issue * fix(struct_tags): typo * refactor(docs): change the order in generated file * docs: install deps * refactor(scripts): rename doc-gen script * docs(impl): write docs * docs(dap): add doc * stylua . * docs(struct_tags): add doc * docs(gotests): add docs * docs(iferr): add docs * docs(comment): add doc * update CONTRIBUTING.md * docs(README): talk about `develop` branch * docs: update README.md
34 lines
1 KiB
Lua
34 lines
1 KiB
Lua
local function root(p)
|
|
local f = debug.getinfo(1, "S").source:sub(2)
|
|
return vim.fn.fnamemodify(f, ":p:h:h") .. "/" .. (p or "")
|
|
end
|
|
|
|
local function install_plug(plugin)
|
|
local name = plugin:match ".*/(.*)"
|
|
local package_root = root ".tests/site/pack/deps/start/"
|
|
if not vim.loop.fs_stat(package_root .. name) then
|
|
print("Installing " .. plugin)
|
|
vim.fn.mkdir(package_root, "p")
|
|
vim.fn.system {
|
|
"git",
|
|
"clone",
|
|
"--depth=1",
|
|
"https://github.com/" .. plugin .. ".git",
|
|
package_root .. "/" .. name,
|
|
}
|
|
end
|
|
end
|
|
|
|
vim.cmd [[set runtimepath=$VIMRUNTIME]]
|
|
vim.opt.runtimepath:append(root())
|
|
vim.opt.packpath = { root ".tests/site" }
|
|
vim.notify = print
|
|
|
|
install_plug "nvim-lua/plenary.nvim"
|
|
install_plug "nvim-treesitter/nvim-treesitter"
|
|
install_plug "echasnovski/mini.doc" -- used for docs generation
|
|
|
|
vim.env.XDG_CONFIG_HOME = root ".tests/config"
|
|
vim.env.XDG_DATA_HOME = root ".tests/data"
|
|
vim.env.XDG_STATE_HOME = root ".tests/state"
|
|
vim.env.XDG_CACHE_HOME = root ".tests/cache"
|