neovim: show active macro recording in statusline

This commit is contained in:
2025-05-12 17:56:25 +03:00
parent 18592a1680
commit e8a0ca41b3

View File

@@ -26,6 +26,17 @@ local searchcount = {
"searchcount", "searchcount",
} }
local macro_recording = {
function()
local symbol = vim.fn.reg_recording()
if symbol ~= "" then
return "@" .. symbol
else
return ""
end
end,
}
local filetype = { local filetype = {
function() function()
local filetype = vim.bo.filetype local filetype = vim.bo.filetype
@@ -117,7 +128,7 @@ lualine.setup({
lualine_a = { mode }, lualine_a = { mode },
lualine_b = { branch }, lualine_b = { branch },
lualine_c = { diagnostics, relative_filename }, lualine_c = { diagnostics, relative_filename },
lualine_x = { searchcount, location, tabstop, fileformat }, lualine_x = { macro_recording, searchcount, location, tabstop, fileformat },
lualine_y = { filetype }, lualine_y = { filetype },
lualine_z = {}, lualine_z = {},
}, },