diff options
author | max397574 <[email protected]> | 2021-10-18 13:28:38 +0200 |
---|---|---|
committer | max397574 <[email protected]> | 2021-10-18 13:28:38 +0200 |
commit | 08a16211dd1f172f2d0cf683d0f19c704b900afc (patch) | |
tree | eb6df7e1c16af7e7ea7d8a25e5c4108d2856c0be /lua/startup | |
parent | 2c90807951e0f015e848a34f89baa48b66510ac4 (diff) |
feat(buildingblocks): ✨moved oldfiles to utils and new function
Diffstat (limited to 'lua/startup')
-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() |