Skip to content

Commit

Permalink
feat(ui): show any helps files and added hover handler
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 3, 2022
1 parent 6e44be0 commit 13b5688
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/lazy/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ function M.show(mode)
local plugin = get_plugin()
Util.open(plugin.dir .. "/README.md")
end,
["|(%S-)|"] = vim.cmd.help, -- vim help links
["(https?://%S+)"] = function(url)
Util.open(url)
end,
Expand Down
5 changes: 5 additions & 0 deletions lua/lazy/view/render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,11 @@ function M:details(plugin)
if Util.file_exists(plugin.dir .. "/README.md") then
table.insert(props, { "readme", "README.md" })
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
if plugin[handler] then
Expand Down

0 comments on commit 13b5688

Please sign in to comment.