nvim-tree / nvim-web-devicons

lua `fork` of vim-web-devicons for neovim
MIT License
2.02k stars 182 forks source link

Add *test.js orange color for react like vs-code #191

Closed scardenasb closed 1 year ago

scardenasb commented 1 year ago

Add JS icon but in orange for test JS files (eg: App.test.js) like vs-code.

T-727 commented 1 year ago

Isn't it sort of odd to merge this considering most languages have test extensions yet this only supports Javascript? Some PRs were made to support generic patterns like *.test.* but were closed because of potential performance issues. (although none were actually measured as far as I'm aware)

alex-courtis commented 1 year ago

Isn't it sort of odd to merge this considering most languages have test extensions yet this only supports Javascript? Some PRs were made to support generic patterns like *.test.* but were closed because of potential performance issues. (although none were actually measured as far as I'm aware)

These are javascript specific test files, hence they have a javascript specific extension. All the nvim-web-devicons icons are quite targeted to specific file types rather than generic.

T-727 commented 1 year ago

Hmm, I suppose having specifics is good for differentiating between different languages' tests if they happen to be together.

But wouldn't this mean that if users wanted support for other languages' test icons they would just have to make PRs like this one? Which could expand the table quite a lot over time, resulting in potentially worse performance? (just theorizing)

alex-courtis commented 1 year ago

But wouldn't this mean that if users wanted support for other languages' test icons they would just have to make PRs like this one? Which could expand the table quite a lot over time, resulting in potentially worse performance? (just theorizing)

You can configure your own icons via https://github.com/nvim-tree/nvim-web-devicons#set-an-icon

T-727 commented 1 year ago

True yes, but in this example the icon is provided by the plugin itself, which encourages users to contribute and get other test icons merged.