Skip to content

Commit 9736671

Browse files
committed
feat(ui): added dir to props
1 parent 23984dd commit 9736671

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/lazy/view/render.lua

+6-1
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ end
338338

339339
---@param task LazyTask
340340
function M:log(task)
341+
-- FIXME: only show last log task
341342
local log = vim.trim(task.output)
342343
if log ~= "" then
343344
local lines = vim.split(log, "\n")
@@ -365,7 +366,10 @@ end
365366
function M:details(plugin)
366367
---@type string[][]
367368
local props = {}
368-
table.insert(props, { "url", (plugin.url:gsub("%.git$", "")), "@text.reference" })
369+
table.insert(props, { "dir", plugin.dir, "@text.reference" })
370+
if plugin.url then
371+
table.insert(props, { "url", (plugin.url:gsub("%.git$", "")), "@text.reference" })
372+
end
369373
local git = Git.info(plugin.dir, true)
370374
if git then
371375
git.branch = git.branch or Git.get_branch(plugin)
@@ -385,6 +389,7 @@ function M:details(plugin)
385389
end
386390
Util.ls(plugin.dir .. "/doc", function(_, name)
387391
if name:find("%.txt$") then
392+
-- FIXME: the help tag is wrong
388393
table.insert(props, { "help", "|" .. name:gsub("%.txt", "") .. "|" })
389394
end
390395
end)

0 commit comments

Comments
 (0)