feat(lualine): add macro recording status
This commit is contained in:
parent
c58d5fb85a
commit
5673bcd017
2 changed files with 19 additions and 2 deletions
|
@ -52,7 +52,9 @@ return {
|
||||||
},
|
},
|
||||||
custom_sections.shortenedFilePath,
|
custom_sections.shortenedFilePath,
|
||||||
},
|
},
|
||||||
lualine_c = { custom_sections.diff },
|
lualine_c = {
|
||||||
|
custom_sections.diff,
|
||||||
|
},
|
||||||
lualine_x = { 'diagnostics' },
|
lualine_x = { 'diagnostics' },
|
||||||
lualine_y = { lsp_utils.get_lsp_status_str },
|
lualine_y = { lsp_utils.get_lsp_status_str },
|
||||||
lualine_z = { 'location', 'progress' },
|
lualine_z = { 'location', 'progress' },
|
||||||
|
@ -80,7 +82,13 @@ return {
|
||||||
lualine_a = { utils.get_short_cwd },
|
lualine_a = { utils.get_short_cwd },
|
||||||
lualine_b = { custom_sections.branch },
|
lualine_b = { custom_sections.branch },
|
||||||
lualine_c = { custom_sections.relativeFilePath },
|
lualine_c = { custom_sections.relativeFilePath },
|
||||||
lualine_x = { 'filetype' },
|
lualine_x = {
|
||||||
|
{
|
||||||
|
'macro-recording',
|
||||||
|
fmt = utils.show_macro_recording,
|
||||||
|
},
|
||||||
|
'filetype',
|
||||||
|
},
|
||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = {},
|
lualine_z = {},
|
||||||
},
|
},
|
||||||
|
|
|
@ -72,4 +72,13 @@ function M.diff_source()
|
||||||
end
|
end
|
||||||
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
|
return M
|
||||||
|
|
Loading…
Add table
Reference in a new issue