diff options
author | max397574 <[email protected]> | 2021-11-01 14:15:31 +0100 |
---|---|---|
committer | max397574 <[email protected]> | 2021-11-01 14:15:31 +0100 |
commit | fa28ef4a6ed037a528d18dfcbdd4ee192e45591b (patch) | |
tree | 770b9f57387df32938dbdc85dd16ad1570eb702a /lua/startup | |
parent | fcf2cb02a3c4a4946a86e7ec4d9414de2f372041 (diff) |
refactor(buildingblocks): 🔄don't use local M
Diffstat (limited to 'lua/startup')
-rw-r--r-- | lua/startup/buildingblocks/functions.lua | 10 | ||||
-rw-r--r-- | lua/startup/buildingblocks/headers.lua | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lua/startup/buildingblocks/functions.lua b/lua/startup/buildingblocks/functions.lua index a0cdd75..cb995a5 100644 --- a/lua/startup/buildingblocks/functions.lua +++ b/lua/startup/buildingblocks/functions.lua @@ -1,4 +1,4 @@ -local M = {} +local functions = {} local quotes = { { "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.", @@ -106,13 +106,13 @@ local quotes = { }, } -function M.quote() +function functions.quote() math.randomseed(os.clock()) local index = math.random() * #quotes return quotes[math.floor(index) + 1] end -function M.startup_time() +function functions.startup_time() local time_str = "Nvim loaded in " .. vim.fn.printf( "%.3f", @@ -122,7 +122,7 @@ function M.startup_time() return { time_str } end -function M.packer_plugins() +function functions.packer_plugins() return { string.format( "Total plugins (packer.nvim): %d", @@ -131,4 +131,4 @@ function M.packer_plugins() } end -return M +return functions diff --git a/lua/startup/buildingblocks/headers.lua b/lua/startup/buildingblocks/headers.lua index 4df1798..d95511a 100644 --- a/lua/startup/buildingblocks/headers.lua +++ b/lua/startup/buildingblocks/headers.lua @@ -1,6 +1,6 @@ -local M = {} +local headers = {} -function M.default_header() +function headers.default_header() return { " /$$ ", " |__/ ", @@ -13,7 +13,7 @@ function M.default_header() } end -function M.hydra() +function headers.hydra() return { " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈â£â£¿â£¶â£¿â£¦â£¼â£† ", " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", @@ -29,7 +29,7 @@ function M.hydra() } end -function M.neovim_logo() +function headers.neovim_logo() return { "⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣄⠀⠀⠀⠀⠀⠀⠀", "⠀⠀⠀⠀⠀⠀⣀⣶⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣷⣄⠀⠀⠀⠀⠀", @@ -53,4 +53,4 @@ function M.neovim_logo() } end -return M +return headers |