feat(nvim): embed macro recording in the statusline
This commit is contained in:
parent
0449c0382c
commit
5b00b9f321
@ -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,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user