Skip to content

Commit 5bf9773

Browse files
committed
refactor(utils): restore some deleted comments
1 parent d658a10 commit 5bf9773

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/dashboard/utils.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ function utils.get_max_len(contents)
3535
return cells[#cells]
3636
end
3737

38+
-- draw the graphics into the screen center
3839
function utils.center_align(tbl)
3940
vim.validate('tbl', tbl, 'table')
4041
local function fill_sizes(lines)
@@ -95,6 +96,7 @@ function utils.disable_move_key(bufnr)
9596
end, keys)
9697
end
9798

99+
-- return the most recently files list
98100
function utils.get_mru_list()
99101
local mru = {}
100102
for _, file in pairs(vim.v.oldfiles or {}) do
@@ -107,8 +109,10 @@ end
107109

108110
function utils.get_package_manager_stats()
109111
local package_manager_stats = { name = '', count = 0, loaded = 0, time = 0 }
112+
---@diagnostic disable-next-line: undefined-global
110113
if packer_plugins then
111114
package_manager_stats.name = 'packer'
115+
---@diagnostic disable-next-line: undefined-global
112116
package_manager_stats.count = #vim.tbl_keys(packer_plugins)
113117
end
114118
local status, lazy = pcall(require, 'lazy')
@@ -122,6 +126,7 @@ function utils.get_package_manager_stats()
122126
return package_manager_stats
123127
end
124128

129+
--- generate an empty table by length
125130
function utils.generate_empty_table(length)
126131
local empty_tbl = {}
127132
if length == 0 then
@@ -181,7 +186,7 @@ function utils.add_update_footer_command(bufnr, footer)
181186
vim.bo[bufnr].modifiable = false
182187
vim.bo[bufnr].modified = false
183188

184-
last_footer_size = #args.fargs
189+
last_footer_size = #args.fargs -- For future calculation of size
185190
end, { nargs = '*' })
186191
end
187192

0 commit comments

Comments
 (0)