mirror of https://github.com/folke/lazy.nvim.git
feat(ui): show any helps files and added hover handler
This commit is contained in:
parent
6e44be0f2d
commit
13b5688487
|
@ -155,6 +155,7 @@ function M.show(mode)
|
||||||
local plugin = get_plugin()
|
local plugin = get_plugin()
|
||||||
Util.open(plugin.dir .. "/README.md")
|
Util.open(plugin.dir .. "/README.md")
|
||||||
end,
|
end,
|
||||||
|
["|(%S-)|"] = vim.cmd.help, -- vim help links
|
||||||
["(https?://%S+)"] = function(url)
|
["(https?://%S+)"] = function(url)
|
||||||
Util.open(url)
|
Util.open(url)
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -376,6 +376,11 @@ function M:details(plugin)
|
||||||
if Util.file_exists(plugin.dir .. "/README.md") then
|
if Util.file_exists(plugin.dir .. "/README.md") then
|
||||||
table.insert(props, { "readme", "README.md" })
|
table.insert(props, { "readme", "README.md" })
|
||||||
end
|
end
|
||||||
|
Util.ls(plugin.dir .. "/doc", function(_, name)
|
||||||
|
if name:find("%.txt$") then
|
||||||
|
table.insert(props, { "help", "|" .. name:gsub("%.txt", "") .. "|" })
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
for handler in pairs(Handler.handlers) do
|
for handler in pairs(Handler.handlers) do
|
||||||
if plugin[handler] then
|
if plugin[handler] then
|
||||||
|
|
Loading…
Reference in New Issue