Skip to content

Commit 347e1eb

Browse files
authored
fix(#2758): use nvim-webdevicons default file icon, not renderer.icons.glyphs.default, as per :help (#2759)
fix(#2758): use nvim-webdevicons default for default files
1 parent 76db7ed commit 347e1eb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/nvim-tree/renderer/components/icons.lua

+6-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ local function get_file_icon_webdev(fname, extension)
6565
-- If there are more extensions to the file, try to grab the icon for them recursively
6666
return get_file_icon_webdev(fname, string.match(extension, "%.(.*)"))
6767
else
68-
return get_file_icon_default()
68+
local devicons_default = M.devicons.get_default_icon()
69+
if devicons_default and type(devicons_default.icon) == "string" and type(devicons_default.name) == "string" then
70+
return devicons_default.icon, "DevIcon" .. devicons_default.name
71+
else
72+
return get_file_icon_default()
73+
end
6974
end
7075
end
7176

0 commit comments

Comments
 (0)