Closed sethen closed 2 months ago
I solved some of my issue. Part of it was I had to set some things for the file tree explorer itself. However, the default icon isn't working for everything.
To confirm: does the default default icon show when you remove set_default_icon
?
To confirm: does the default default icon show when you remove
set_default_icon
?
Not sure what you mean... if I delete the set_delete_icon
function does the default icon show??
Here is also another thing I am seeing -- I would assume the default icon would take over here when the TelescopePrompt
comes up but it doesn't... However, it does when the help
buffer is open. Check the status bar on the bottom right.
No default icon:
Default icon:
Experimenting with your setup:
require("nvim-web-devicons").set_default_icon('D', '#6d8086', 65)
print(vim.inspect(require("nvim-web-devicons").get_default_icon()))
{
color = "#6d8086",
cterm_color = 65,
icon = "D",
name = "Default"
}
require("nvim-web-devicons").set_default_icon('X')
print(vim.inspect(require("nvim-web-devicons").get_default_icon()))
{
icon = "X",
name = "Default"
}
That is working as intended, presuming that icon
in your screenshot is require("nvim-web-devicons")
To confirm: does the default default icon show when you remove
set_default_icon
?Not sure what you mean... if I delete the
set_delete_icon
function does the default icon show??
Yes.
However... that's not to say that nvim-tree, telescope or lualine will actually use it, they may use their own.
Experimenting with nvim-tree and :NvimWebDeviconsHiTest
shows that the default icon is not shown or used. Investigating...
:NvimWebDeviconsHiTest
not showing the default is unrelated. Fixed at #451
nvim-tree is not showing the default icon, contradicting help:
*nvim-tree.renderer.icons.web_devicons.file.enable*
Show icons on files.
Overrides |nvim-tree.renderer.icons.glyphs.default|
Type: `boolean`, Default: `true`
*nvim-tree.renderer.icons.glyphs.default*
Glyph for files.
Overridden by |nvim-tree.renderer.icons.web_devicons| if available.
Type: `string`, Default: `""`
Raised https://github.com/nvim-tree/nvim-tree.lua/issues/2758
RE lualine: it does not show default icons. I'll leave telescope to you...
Does resolution of this issue resolve your concerns? https://github.com/nvim-tree/nvim-tree.lua/issues/2758#issuecomment-2081313671
RE lualine: it does not show default icons. I'll leave telescope to you...
Does resolution of this issue resolve your concerns? nvim-tree/nvim-tree.lua#2758 (comment)
I left a comment over there. Happy to test, just unsure how.
Fixed via nvim-tree https://github.com/nvim-tree/nvim-tree.lua/pull/2759
@alex-courtis Still not seeing the default icon taking effect even after updating nvim-tree.
@alex-courtis Still not seeing the default icon taking effect even after updating nvim-tree.
That's no good; we'll get to the bottom of this. I reckon it's nvim-tree.
Please raise an nvim-tree bug report with your nvim-tree and nvim-webdevicons minimal configuration so that we may reproduce and fix.
I've set a default icon but for whatever reason it's not being picked up by certain files. For instance:
However, the setup shows the icon perfectly fine:
As you can see the editor renders the page icon just fine but it is not applying it to all icons as a default.