Skip to content

Commit 8324fd5

Browse files
authored
fix: lowercase file extension when looking up icon (#1003)
fixes #1001
1 parent 95776b6 commit 8324fd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/neo-tree/sources/common/components.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ M.icon = function(config, node, state)
280280
elseif node.type == "file" or node.type == "terminal" then
281281
local success, web_devicons = pcall(require, "nvim-web-devicons")
282282
if success then
283-
local devicon, hl = web_devicons.get_icon(node.name, node.ext)
283+
local ext = node.ext and node.ext:lower() or nil
284+
local devicon, hl = web_devicons.get_icon(node.name, ext)
284285
icon = devicon or icon
285286
highlight = hl or highlight
286287
end

0 commit comments

Comments
 (0)