Skip to content

Commit

Permalink
feat(nvim): Add statusline component to show when macro is being reco…
Browse files Browse the repository at this point in the history
…rded
  • Loading branch information
mrjones2014 committed Jan 5, 2024
1 parent a98c4b2 commit ed9ec21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions nvim/lua/my/configure/heirline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ return {
sl.Align,
sl.UnsavedChanges,
sl.Align,
sl.RecordingMacro,
sl.LspFormatToggle,
sl.LazyStats,
sl.OnePassword,
Expand Down
12 changes: 12 additions & 0 deletions nvim/lua/my/configure/heirline/statusline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,16 @@ M.MarkdownPreview = {
},
}

M.RecordingMacro = {
provider = function()
local macro_reg = vim.fn.reg_recording()
if macro_reg == '' then
return ''
end

return string.format(' Recording macro: %s ', macro_reg)
end,
hl = { bg = 'bg_statusline' },
}

return M

0 comments on commit ed9ec21

Please sign in to comment.