stevearc / oil.nvim

Neovim file explorer: edit your filesystem like a buffer
MIT License
3.5k stars 99 forks source link

bug: mini.icons not showing up #445

Closed Rasmus-Bertell closed 3 weeks ago

Rasmus-Bertell commented 3 weeks ago

Did you check the docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.0

Operating system/version

Archlinux 6.9.8-arch1-1

Describe the bug

Installing oil.nvim with dependency on mini.icons doesn't show any icons. I have to add opts to the dependency for it to work.

What is the severity of this bug?

minor (annoyance)

Steps To Reproduce

  1. nvim -u repro.lua
  2. Open folder
  3. No icons???
  4. Uncomment opts={}
  5. Open folder
  6. Icons show up

Expected Behavior

I would expect for both plugin dependencies to work without any extra fiddling.

Directory structure

No response

Repro

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
        "stevearc/oil.nvim",
        config = function()
            require("oil").setup({
              -- add any needed settings here
            })
        end,
        dependencies = {
      {
            'echasnovski/mini.icons',
        -- opts = {},
          },
    },
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Did you check the bug with a clean config?

Rasmus-Bertell commented 3 weeks ago

This might be more of a problem with mini.icons, I'll open a related issue for it.

stevearc commented 3 weeks ago

I've updated the snippet in the docs to include opts = {}. You'll have to call mini.icons.setup at some point for it to work. It doesn't have to be in this dependencies list, but if we're providing a snippet it makes sense to make the snippet work in isolation.