Closed RafaelAntonny closed 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
Like just setup({}) for nvim-tree right ? I just did that nothing has changed
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.
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
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.
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
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:
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
otherwise npm can't run it
You think this is an appropriate point to close the issue ?
Sounds like they're incorrect... pull requests are gratefully appreciated.
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.
this is the result when I do a get_icon and a print
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.