-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Animations like the ones suggested in #132 should not need to be hard-coded into our spinner library, since they just involve translating a static string across an empty space. Such animation frames can easily be generated with something like this:
-- UNTESTED CODE btw
local function bouncer(icon, width)
local frames = {}
local padding = width - vim.fn.strdisplaywidth(icon)
assert(padding > 0)
for i=0, padding do
table.insert(frames, string.format("%s%s%s", string.rep(" ", i), icon, string.rep(" ", width - i))
end
for i=1, padding do
table.insert(frames, string.format("%s%s%s", string.rep(" ", width - i), icon, string.rep(" ", width))
end
return frames
endThis kind of thing can and should be added to spinner as a combinator so that users can roll their own anime
Other combinator ideas (resurrect HTML tags with vengeance):
-
<marquee>-style scrolling text -
<blink>-style blinkers
Fidget could even support animated epic gamer highlights (though this will require supporting _style fields as functions):
- "breathing" highlights that fade brighter and darker 😎
- rainbow highlights 🌈
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers