nvim-tree / nvim-web-devicons

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

Gulpfile and Gruntfile incorrect icon #456

Closed RafaelAntonny closed 2 months ago

RafaelAntonny commented 2 months ago

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.

alex-courtis commented 2 months ago

Lazy loading is problematic.

Please try and reproduce using the minimal nvim-tree bug report template as per https://github.com/nvim-tree/nvim-web-devicons/issues/455#issuecomment-2081716098

RafaelAntonny commented 2 months ago

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'

RafaelAntonny commented 2 months ago

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

alex-courtis commented 2 months ago

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

RafaelAntonny commented 2 months ago

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

alex-courtis commented 2 months ago

this is packer, minimal neovim install

Excellent. Please share so that we can reproduce.

RafaelAntonny commented 2 months ago

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

alex-courtis commented 2 months ago

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

RafaelAntonny commented 2 months ago

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

alex-courtis commented 2 months ago

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?

RafaelAntonny commented 2 months ago

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 ?

alex-courtis commented 2 months ago

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