nvim-tree/nvim-web-devicons

Gulpfile and Gruntfile incorrect icon

RafaelAntonny opened this issue · 12 comments

image

I'm using Lazy as my package manager devicons is a dependency for these following plugins that I have downloaded lualine, telescope and nvim-tree.
I already did a set_icon() for gulp I was able to change the icon but I wasn't able to change the color.
image
this is the result when I do a get_icon and a print
image
I already tried to make devicons load faster by putting it in a after/plugins folder which did make it load ahead of the plugins that are dependant on devicons but that didn't fix my problem, the icon is still the JS icon.

Lazy loading is problematic.

Please try and reproduce using the minimal nvim-tree bug report template as per #455 (comment)

Like just setup({}) for nvim-tree right ? I just did that nothing has changed
image
Also, my mistake, its not only nvim-tree that is having the problem with the incorrect icons telescope, bufferline (didn't mention before because I forgot) are also having that problem, I don't use the file icons for lualine so I cannot tell if its having the same issue but ig its a safe bet to say it does.
image
image
I did try override the icon again a little earlier, it did work with the colors and everything but only after I changed from 'gulpfile' to 'gulpfile.js'

I forgot to mention, after you pointed out the lazy loading I turned lazy loading for all of these plugins that are dependant on devicon to see if any of them were interfering with devicons loading, no success there

update: changed devicons priority to 1000 and dependants priority to 0, no effects
image

There's a lot going on there; please try a minimal config without lazy.

Sorry for the delay, was figuring out how to install plugins with packer lol.
image
this is packer, minimal neovim install

this is packer, minimal neovim install

Excellent. Please share so that we can reproduce.

aye, this repo here has the files if it isn't a problem

aye, this repo here has the files if it isn't a problem

Sorry, I'm not going to debug your configuration.

Minimal configuration as requested please. We'll be mandating that soon: #457

image

for name, url in pairs{
  devicons = 'https://github.com/nvim-tree/nvim-web-devicons',
  nvimtree = 'https://github.com/nvim-tree/nvim-tree.lua',
} do
  local install_path = vim.fn.fnamemodify('devicons_issue'..name, ':p')
  if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
  end
  vim.opt.runtimepath:append(install_path)
end

require('nvim-web-devicons').setup{}
require('nvim-tree').setup()

ran ofc with a nvim --clean -u minimal.lua, again I like to point out that this it not an issue that i'm having exclusively with nvim-tree but all other plugins that use devicons are also having the same issue
first time opening an issue, I apologize if I am being hard to work with

Don't stress, you're fine. We need to add our bug report template.

I like the minimal; that sounds like what we should use.

It looks to be working as intended: gulpfile and gruntfile files show their icons:
20240430_135208

Are those names correct?

interesting so it only works if it doesn't have the .js extension, hmm...
well the name is correct but the .js extension is nescessary
image
otherwise npm can't run it
image

You think this is an appropriate point to close the issue ?

Sounds like they're incorrect... pull requests are gratefully appreciated.