mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-28 06:34:42 +02:00
refactor: remove work-around for fzf lua
This commit is contained in:
parent
8e92c868ff
commit
269344f173
2 changed files with 11 additions and 32 deletions
|
@ -303,7 +303,17 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
-- icons
|
-- icons
|
||||||
{ "echasnovski/mini.icons", lazy = true, opts = {}, init = LazyVim.mini.devicons },
|
{
|
||||||
|
"echasnovski/mini.icons",
|
||||||
|
lazy = true,
|
||||||
|
opts = {},
|
||||||
|
init = function()
|
||||||
|
package.preload["nvim-web-devicons"] = function()
|
||||||
|
require("mini.icons").mock_nvim_web_devicons()
|
||||||
|
return package.loaded["nvim-web-devicons"]
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- ui components
|
-- ui components
|
||||||
{ "MunifTanjim/nui.nvim", lazy = true },
|
{ "MunifTanjim/nui.nvim", lazy = true },
|
||||||
|
|
|
@ -148,35 +148,4 @@ function M.pairs(opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.devicons()
|
|
||||||
package.preload["nvim-web-devicons"] = function()
|
|
||||||
local Icons = require("mini.icons")
|
|
||||||
local ret = {}
|
|
||||||
package.loaded["nvim-web-devicons"] = ret
|
|
||||||
Icons.mock_nvim_web_devicons()
|
|
||||||
|
|
||||||
local function get(cat)
|
|
||||||
local all = {}
|
|
||||||
for _, name in ipairs(Icons.list(cat)) do
|
|
||||||
local icon, color = ret.get_icon_color(cat == "file" and name, cat == "extension" and name)
|
|
||||||
all[name] = { icon = icon, color = color }
|
|
||||||
end
|
|
||||||
return all
|
|
||||||
end
|
|
||||||
|
|
||||||
ret.get_icons_by_extension = function()
|
|
||||||
return get("extension")
|
|
||||||
end
|
|
||||||
|
|
||||||
ret.get_icons_by_filename = function()
|
|
||||||
return get("file")
|
|
||||||
end
|
|
||||||
|
|
||||||
ret.get_icons = function()
|
|
||||||
return vim.tbl_extend("force", get("file"), get("extension"))
|
|
||||||
end
|
|
||||||
return ret
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue