diff --git a/README.md b/README.md index 0dfc7c6..7fb8de3 100644 --- a/README.md +++ b/README.md @@ -435,6 +435,7 @@ return { -- so :help works even for plugins that don't have vim docs. -- when the readme opens with :help it will be correctly displayed as markdown readme = { + enabled = true, root = vim.fn.stdpath("state") .. "/lazy/readme", files = { "README.md", "lua/**/README.md" }, -- only generate markdown helptags for plugins that dont have docs diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index db2abd8..bcf1f39 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -141,6 +141,7 @@ M.defaults = { -- so :help works even for plugins that don't have vim docs. -- when the readme opens with :help it will be correctly displayed as markdown readme = { + enabled = true, root = vim.fn.stdpath("state") .. "/lazy/readme", files = { "README.md", "lua/**/README.md" }, -- only generate markdown helptags for plugins that dont have docs diff --git a/lua/lazy/help.lua b/lua/lazy/help.lua index 599e2b4..4a289eb 100644 --- a/lua/lazy/help.lua +++ b/lua/lazy/help.lua @@ -41,6 +41,10 @@ function M.update() if Config.plugins["lazy.nvim"] then vim.cmd.helptags(Config.plugins["lazy.nvim"].dir .. "/doc") end + if Config.options.readme.enabled == false then + return + end + local docs = Config.options.readme.root .. "/doc" vim.fn.mkdir(docs, "p")