Skip to content

Commit

Permalink
fix: lowercase file extension when looking up icon (#1003)
Browse files Browse the repository at this point in the history
fixes #1001
  • Loading branch information
cseickel committed Jun 21, 2023
1 parent 95776b6 commit 8324fd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/neo-tree/sources/common/components.lua
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ M.icon = function(config, node, state)
elseif node.type == "file" or node.type == "terminal" then
local success, web_devicons = pcall(require, "nvim-web-devicons")
if success then
local devicon, hl = web_devicons.get_icon(node.name, node.ext)
local ext = node.ext and node.ext:lower() or nil
local devicon, hl = web_devicons.get_icon(node.name, ext)
icon = devicon or icon
highlight = hl or highlight
end
Expand Down

0 comments on commit 8324fd5

Please sign in to comment.