diff --git a/lua/oil/util.lua b/lua/oil/util.lua index c84c1e97..f422c7a2 100644 --- a/lua/oil/util.lua +++ b/lua/oil/util.lua @@ -865,7 +865,8 @@ end M.get_icon_provider = function() -- prefer mini.icons local has_mini_icons, mini_icons = pcall(require, "mini.icons") - if has_mini_icons then + ---@diagnostic disable-next-line: undefined-field + if has_mini_icons and _G.MiniIcons then return function(type, name) return mini_icons.get(type == "directory" and "directory" or "file", name) end