-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support mini.icons in mini.starter #1399
Comments
Thanks for the suggestion! Unfortunately, it is not as easy as it might seem at first glance. The main obstacle is that 'mini.starter' shows unique prefix for each item to highlight it with different highlight group. That unique prefix is (intentionally) computed from item's name. Both of these facts make adding icons more complicated as it should be:
The relatively easy approach to implement this right now is to add icons to the right of the file name, but I think it doesn't look good and doesn't really help improve usability. I'll think if there is another approach or if any of mentioned above are reasonable. |
I've just tried the So I think the first approach with modifying how prefix is computed and highlighted might be the best approach here. |
I'm learning function mysplit(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t = {}
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
table.insert(t, str)
end
return t
end |
Neovim has |
When icon is enabled, don't we just need to remove anything in front of the first space before calculating prefix? |
This might work, but would require some hack-ish way to manipulate data structures. I think computing prefix only from registered query updaters is a good approach in on itself which just happens to unlock adding icons this way. |
Contributing guidelines
Module(s)
mini.starter
Description
Hey, I have been integrating more mini.nvim lately.
mini.deps
,mini.sessions
andmini.starter
been the latest.While (as always) liking the minimal implementation of each plugin, I'm wondering if we could have mini.icons natively support mini.starters for various items:
Thanks for your consideration.
The text was updated successfully, but these errors were encountered: