diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2022-12-02 10:21:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-02 10:21:44 +0100 |
| commit | 361a172fceef1caca1e16b51a2556ec3bb73a576 (patch) | |
| tree | 7802ddf4d27841697ff60fda8af37e0f1bf41970 /lua/telescope/utils.lua | |
| parent | f37c603303925c643056437f31a0998e4cf2232d (diff) | |
fix: icons with multiple dots but without custom overrides (#2256)
Diffstat (limited to 'lua/telescope/utils.lua')
| -rw-r--r-- | lua/telescope/utils.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index 97ef2e3..f2ab21e 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -457,7 +457,10 @@ utils.transform_devicons = load_once(function() end local basename = utils.path_tail(filename) - local icon, icon_highlight = devicons.get_icon(basename, utils.file_extension(basename), { default = true }) + local icon, icon_highlight = devicons.get_icon(basename, utils.file_extension(basename), { default = false }) + if not icon then + icon, icon_highlight = devicons.get_icon(basename, nil, { default = true }) + end local icon_display = (icon or " ") .. " " .. (display or "") if conf.color_devicons then @@ -488,7 +491,10 @@ utils.get_devicons = load_once(function() end local basename = utils.path_tail(filename) - local icon, icon_highlight = devicons.get_icon(basename, utils.file_extension(basename), { default = true }) + local icon, icon_highlight = devicons.get_icon(basename, utils.file_extension(basename), { default = false }) + if not icon then + icon, icon_highlight = devicons.get_icon(basename, nil, { default = true }) + end if conf.color_devicons then return icon, icon_highlight else |
