utilyre / barbecue.nvim

Visual Studio Code inspired breadcrumbs plugin for the Neovim editor
MIT License
776 stars 31 forks source link

fix: correct file icon for nested extensions #100

Open ismailshak opened 6 months ago

ismailshak commented 6 months ago

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