diff options
Diffstat (limited to 'lua/startup/buildingblocks/functions.lua')
-rw-r--r-- | lua/startup/buildingblocks/functions.lua | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lua/startup/buildingblocks/functions.lua b/lua/startup/buildingblocks/functions.lua index 3da817d..a0cdd75 100644 --- a/lua/startup/buildingblocks/functions.lua +++ b/lua/startup/buildingblocks/functions.lua @@ -112,18 +112,14 @@ function M.quote() return quotes[math.floor(index) + 1] end -function M.oldfiles(amount) - local oldfiles = {} - table.insert(oldfiles, "Press 'o' to open the file under the cursor") - local count = 0 - for _, file in ipairs(vim.v.oldfiles) do - if count == amount then - break - end - table.insert(oldfiles, file) - count = count + 1 - end - return oldfiles +function M.startup_time() + local time_str = "Nvim loaded in " + .. vim.fn.printf( + "%.3f", + vim.fn.reltimefloat(vim.fn.reltime(vim.g.start_time)) + ) + .. " seconds." + return { time_str } end function M.packer_plugins() |