romgrk / barbar.nvim

The neovim tabline plugin.
2.26k stars 85 forks source link

Error: `icons.filetype.enabled` is set to `true` but `nvim-dev-icons` was not found #498

Closed 03juan closed 1 year ago

03juan commented 1 year ago

Description

I get the following message on startup:

barbar.nvim: icons.filetype.enabled is set to true but nvim-dev-icons was not found. barbar.nvim: icons have been disabled. Set icons.filetype.enabled to false or install nvim-dev-iconsto disable this message.

To Reproduce

Installed with the suggested Packer command:

  use {
    "romgrk/barbar.nvim",
    requires = {
      "lewis6991/gitsigns.nvim",
      "nvim-tree/nvim-web-devicons"
    }
  }

The config is:

require("barbar").setup {
  focus_on_close = "previous",
  hide = { extensions = true },
  icons = {
    filetype = {
      custom_colors = false,
      enabled = true,
    },
    gitsigns = {
      added = {enabled = true, icon = '+'},
      changed = {enabled = true, icon = '~'},
      deleted = {enabled = true, icon = '-'},
    },
    pinned = {button = '´ñé', filename = true},
  },
  sidebar_filetypes = {
    ['neo-tree'] = { event = 'BufWipeout' },
  },
}

Information Neovim version: v0.9.0

FIX I moved the devicons plugin installation out of requires and icons work again:

  use "nvim-tree/nvim-web-devicons"
  use {
    "romgrk/barbar.nvim",
    requires = {
      "lewis6991/gitsigns.nvim",
    }
  }
Iron-E commented 1 year ago

Good old packer… I remember the requires bug but heard it had been fixed on thr latest main. I'll update the documentation.

03juan commented 1 year ago

I'm new to vim. Which would you recommend instead, lazy or plug?

Iron-E commented 1 year ago

lazy.nvim for sure!