From 9ac113b5de4b8a38ee6e6e620902cb263586992c Mon Sep 17 00:00:00 2001 From: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com> Date: Thu, 4 Jul 2024 14:04:45 +0200 Subject: [PATCH] feat(icon): Add mini.icon (#1086) --- lua/astrocommunity/icon/mini-icon/README.md | 5 +++++ lua/astrocommunity/icon/mini-icon/init.lua | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 lua/astrocommunity/icon/mini-icon/README.md create mode 100644 lua/astrocommunity/icon/mini-icon/init.lua diff --git a/lua/astrocommunity/icon/mini-icon/README.md b/lua/astrocommunity/icon/mini-icon/README.md new file mode 100644 index 000000000..62c601600 --- /dev/null +++ b/lua/astrocommunity/icon/mini-icon/README.md @@ -0,0 +1,5 @@ +# mini.icon + +Icon provider. Part of 'mini.nvim' library. + +**Repository:** diff --git a/lua/astrocommunity/icon/mini-icon/init.lua b/lua/astrocommunity/icon/mini-icon/init.lua new file mode 100644 index 000000000..2a0412807 --- /dev/null +++ b/lua/astrocommunity/icon/mini-icon/init.lua @@ -0,0 +1,16 @@ +return { + "echasnovski/mini.icons", + opts = {}, + lazy = true, + specs = { + { "nvim-tree/nvim-web-devicons", enabled = false, optional = true }, + }, + init = function() + package.preload["nvim-web-devicons"] = function() + -- needed since it will be false when loading and mini will fail + package.loaded["nvim-web-devicons"] = {} + require("mini.icons").mock_nvim_web_devicons() + return package.loaded["nvim-web-devicons"] + end + end, +}