From 08a16211dd1f172f2d0cf683d0f19c704b900afc Mon Sep 17 00:00:00 2001 From: max397574 Date: Mon, 18 Oct 2021 13:28:38 +0200 Subject: =?UTF-8?q?feat(buildingblocks):=20=E2=9C=A8moved=20oldfiles=20to?= =?UTF-8?q?=20utils=20and=20new=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/startup/buildingblocks/functions.lua | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'lua/startup') 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() -- cgit v1.2.3