From 3b7086a67b43c8787717c0df2bd3222a2d4815d4 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Mon, 22 Jul 2024 11:20:22 -0400 Subject: [PATCH] refactor: normalize notation used for defining functions --- lua/astroui/status/heirline.lua | 2 +- lua/astroui/status/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/astroui/status/heirline.lua b/lua/astroui/status/heirline.lua index 770f1ce..d21aa12 100644 --- a/lua/astroui/status/heirline.lua +++ b/lua/astroui/status/heirline.lua @@ -33,7 +33,7 @@ end --- Make a list of buffers, rendering each buffer with the provided component ---@param component table ---@return table -M.make_buflist = function(component) +function M.make_buflist(component) local overflow_hl = hl.get_attributes("buffer_overflow", true) return require("heirline.utils").make_buflist( status_utils.surround( diff --git a/lua/astroui/status/init.lua b/lua/astroui/status/init.lua index 389dd62..4b378ac 100644 --- a/lua/astroui/status/init.lua +++ b/lua/astroui/status/init.lua @@ -142,7 +142,7 @@ function M.update_events(opts) ---@cast opts AstroUIUpdateEvent[] return function(self) if not rawget(self, "once") then - local clear_cache = function() self._win_cache = nil end + local function clear_cache() self._win_cache = nil end for _, event in ipairs(opts) do local event_opts = { callback = clear_cache } if type(event) == "table" then