feat(icons): add get_element_icon
option
#686
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since there have been many requests to have icons fetch in some way that a user might prefer e.g. with defaults without defaults, by filetype, by filename, maybe eventually by different package than devicons, this PR adds a
get_icon_element
option which a user can use to decide what is return for each element which is essentially a filename, filetype, directory and path.cc @camiloaromero23 @utilyre @CleoMenezesJr
I've closed #669 in favour of this change since that continues us down the path of option after option of
load_by_x_criteria
. This way a user can just explicitly do whatever they want.Can you please test this PR to see if
a) It solves the original issue
b) It correctly allows you to return whatever icon you want
TODO