feat(lualine): add macro recording status

This commit is contained in:
Matthew Leong 2023-01-09 15:24:11 -08:00
parent c58d5fb85a
commit 5673bcd017
2 changed files with 19 additions and 2 deletions

View file

@ -52,7 +52,9 @@ return {
},
custom_sections.shortenedFilePath,
},
lualine_c = { custom_sections.diff },
lualine_c = {
custom_sections.diff,
},
lualine_x = { 'diagnostics' },
lualine_y = { lsp_utils.get_lsp_status_str },
lualine_z = { 'location', 'progress' },
@ -80,7 +82,13 @@ return {
lualine_a = { utils.get_short_cwd },
lualine_b = { custom_sections.branch },
lualine_c = { custom_sections.relativeFilePath },
lualine_x = { 'filetype' },
lualine_x = {
{
'macro-recording',
fmt = utils.show_macro_recording,
},
'filetype',
},
lualine_y = {},
lualine_z = {},
},

View file

@ -72,4 +72,13 @@ function M.diff_source()
end
end
function M.show_macro_recording()
local recording_register = vim.fn.reg_recording()
if recording_register == '' then
return ''
else
return 'Recording @' .. recording_register
end
end
return M