fix: when dev icons absent (#1214)

* Add helper function to check for dev icon availability

* Add function to display dev icon or nothing if icon plugins unavailable

* Fix existing use of icons

* Reformat with stylua
This commit is contained in:
Oliver Lorton
2025-02-10 17:43:01 +00:00
committed by GitHub
parent 6e18616c16
commit cc46386130
3 changed files with 33 additions and 12 deletions

View File

@@ -23,9 +23,7 @@ M.check = function()
end
-- Optional dependencies
local has_devicons = Utils.has("nvim-web-devicons")
local has_mini_icons = Utils.has("mini.icons") or Utils.has("mini.nvim")
if has_devicons or has_mini_icons then
if Utils.icons_enabled() then
H.ok("Found icons plugin (nvim-web-devicons or mini.icons)")
else
H.warn("No icons plugin found (nvim-web-devicons or mini.icons). Icons will not be displayed")