Idea: macro recording
Closed this issue · 2 comments
catgoose commented
I don't plan on using this plugin because I have my own heirline implementation, but I wanted to share my macro recording block in case you want to add something to this plugin:
local MacroRecording = {
condition = conditions.is_active,
init = function(self)
self.reg_recording = fn.reg_recording()
self.status_dict = vim.b.gitsigns_status_dict or { added = 0, removed = 0, changed = 0 }
self.has_changes = self.status_dict.added ~= 0
or self.status_dict.removed ~= 0
or self.status_dict.changed ~= 0
end,
{
condition = function(self)
return self.reg_recording ~= ""
end,
{
condition = function(self)
return self.has_changes
end,
LeftSep,
},
{
provider = " ",
hl = { fg = colors.autumnRed },
},
{
provider = function(self)
return "@" .. self.reg_recording
end,
hl = { italic = false, bold = true },
},
{
Space,
},
{
LeftSep,
hl = { bg = active_background_color, fg = recording_background_color },
},
hl = { bg = recording_background_color, fg = active_background_color },
},
update = { "RecordingEnter", "RecordingLeave" },
}
Zeioth commented
catgoose commented
Oh nice I didn’t notice!