Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant