How is mock_nvim_web_devicons meant to be used? #1478
-
Contributing guidelines
Module(s)mini.icons QuestionHi there, I'm trying to slot mini.icons in for nvim_web_devicons in https://github.com/utilyre/barbecue.nvim and not having any luck. Here is how I am attempting to use it: return {
"utilyre/barbecue.nvim",
name = "barbecue",
version = "*",
dependencies = {
"SmiteshP/nvim-navic",
"echasnovski/mini.icons",
},
config = function()
require("mini.icons").setup()
MiniIcons.mock_nvim_web_devicons()
end,
opts = {
theme = "tokyonight",
show_modified = true,
show_navic = false,
create_autocmd = true,
},
} Anything obviously wrong here? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You can use the following code to simulate package.preload["nvim-web-devicons"] = function()
package.loaded["nvim-web-devicons"] = {}
MiniIcons.mock_nvim_web_devicons()
return package.loaded["nvim-web-devicons"]
end This will make |
Beta Was this translation helpful? Give feedback.
-
Here is the full example of usage. Just calling it after The reason you don't see effect in 'barbecue.nvim' is due to its special (and as far as I am aware - not entirely robust/correct) usage of 'nvim-web-devicons'. See #1207 and #1265. |
Beta Was this translation helpful? Give feedback.
Here is the full example of usage. Just calling it after
require('mini.icons').setup()
is enough (as you have in your code)The reason you don't see effect in 'barbecue.nvim' is due to its special (and as far as I am aware - not entirely robust/correct) usage of 'nvim-web-devicons'. See #1207 and #1265.