Skip to content

Commit f45161d

Browse files
committed
feat(display): Add lockfile commit to status
1 parent aa14512 commit f45161d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lua/packer/display.lua

+10-1
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ local display_mt = {
352352
self:setup_status_syntax()
353353
self:update_headline_message(fmt('Total plugins: %d', vim.tbl_count(plugins)))
354354

355+
local lockfile = require 'packer.lockfile'
356+
355357
local plugs = {}
356358
local lines = {}
357359

@@ -375,9 +377,16 @@ local display_mt = {
375377
end, details)
376378
vim.list_extend(config_lines, { fmt('%s%s: ', padding, key), unpack(details) })
377379
end
378-
plugs[plug_name] = { lines = config_lines, displayed = false }
379380
end
380381
end
382+
383+
local lockfile_info = lockfile.get(plug_name)
384+
if lockfile_info.commit then
385+
vim.list_extend(config_lines, { fmt('%slockfile: %s', padding, lockfile_info.commit) })
386+
end
387+
388+
plugs[plug_name] = { lines = config_lines, displayed = false }
389+
381390
vim.list_extend(lines, header_lines)
382391
end
383392
table.sort(lines)

0 commit comments

Comments
 (0)