Skip to content

Commit

Permalink
feat(ui): added dir to props
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 17, 2022
1 parent 23984dd commit 9736671
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/lazy/view/render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ end

---@param task LazyTask
function M:log(task)
-- FIXME: only show last log task
local log = vim.trim(task.output)
if log ~= "" then
local lines = vim.split(log, "\n")
Expand Down Expand Up @@ -365,7 +366,10 @@ end
function M:details(plugin)
---@type string[][]
local props = {}
table.insert(props, { "url", (plugin.url:gsub("%.git$", "")), "@text.reference" })
table.insert(props, { "dir", plugin.dir, "@text.reference" })
if plugin.url then
table.insert(props, { "url", (plugin.url:gsub("%.git$", "")), "@text.reference" })
end
local git = Git.info(plugin.dir, true)
if git then
git.branch = git.branch or Git.get_branch(plugin)
Expand All @@ -385,6 +389,7 @@ function M:details(plugin)
end
Util.ls(plugin.dir .. "/doc", function(_, name)
if name:find("%.txt$") then
-- FIXME: the help tag is wrong
table.insert(props, { "help", "|" .. name:gsub("%.txt", "") .. "|" })
end
end)
Expand Down

0 comments on commit 9736671

Please sign in to comment.