diff --git a/dots/.nvim-environments/primary/config/lua/plugins/configs/statusline.lua b/dots/.nvim-environments/primary/config/lua/plugins/configs/statusline.lua index 35f8962e..c224e1e0 100755 --- a/dots/.nvim-environments/primary/config/lua/plugins/configs/statusline.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/configs/statusline.lua @@ -78,6 +78,8 @@ lualine.setup({ }, { show_macro_recording, + "macro-recording", + fmt = show_macro_recording, }, }, lualine_c = { @@ -135,3 +137,26 @@ lualine.setup({ 'toggleterm', }, }) + +vim.api.nvim_create_autocmd("RecordingEnter", { + callback = function() + lualine.refresh({ + place = { "statusline" }, + }) + end, +}) + +vim.api.nvim_create_autocmd("RecordingLeave", { + callback = function() + local timer = vim.loop.new_timer() + timer:start( + 50, + 0, + vim.schedule_wrap(function() + lualine.refresh({ + place = { "statusline" }, + }) + end) + ) + end, +})