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

fix: correct file icon for nested extensions #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ismailshak
Copy link
Contributor

@ismailshak ismailshak commented Feb 18, 2024

The current method for getting the icon for a file doesn't account for nested file extensions

An example of this is some-file.test.ts. The current implementation will only load ts icons but will miss the icon for test.ts.

Before fix:

default typescript icon not the flask icon

After fix:

corrected flask icon for test file

The screenshots were testing the default nvim-web-devicons set for test.ts vs .ts

We could make this more future-proof by recursively testing the nested extensions against the list of icons provided by nvim-web-devicons, but I couldn't think of a use case for this so opted out of supporting that just in case it was overkill

EDIT: oh hey, 100th PR 🎈 lol

ismailshak added a commit to ismailshak/nvim that referenced this pull request Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant