Skip to content
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

Allow user to supply their own get_icon function to set file icons and highlights #2085

Closed
devkvlt opened this issue Mar 26, 2023 · 3 comments
Labels
feature request PR please nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated QOL Quality Of Life Improvement

Comments

@devkvlt
Copy link

devkvlt commented Mar 26, 2023

For example, add an option renderer.icons.glyphs.get_icon_func that expects a function that takes filename, extension and options(?) as input and returns an icon and a highlight group.

@alex-courtis
Copy link
Member

That could work. I'd prefer not to expose the node, however we could clone most of the node's data.

Two callbacks might be preferable get_icon get_hl.

@alex-courtis alex-courtis added the QOL Quality Of Life Improvement label Mar 27, 2023
@alex-courtis alex-courtis added the PR please nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated label Apr 11, 2023
@alex-courtis
Copy link
Member

#2415 Decorators may be enhanced to with a user callback.

@alex-courtis
Copy link
Member

Tracking at #2948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request PR please nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated QOL Quality Of Life Improvement
Projects
None yet
Development

No branches or pull requests

2 participants