Skip to content

Commit 540884c

Browse files
committed
Switch from nvim-web-devicons to mini.icons
1 parent cfdc17b commit 540884c

2 files changed

Lines changed: 8 additions & 14 deletions

File tree

init.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,6 @@ do
340340
vim.pack.add { gh 'NMAC427/guess-indent.nvim' }
341341
require('guess-indent').setup {}
342342

343-
-- Because lua is a real programming language, you can also have some logic to your installation -
344-
-- like only installing a plugin if a condition is met.
345-
--
346-
-- Here we only install `nvim-web-devicons` (which adds pretty icons) if we have a Nerd Font,
347-
-- since otherwise the icons won't display properly.
348-
if vim.g.have_nerd_font then vim.pack.add { gh 'nvim-tree/nvim-web-devicons' } end
349-
350343
-- Here is a more advanced configuration example that passes options to `gitsigns.nvim`
351344
--
352345
-- See `:help gitsigns` to understand what each configuration key does.
@@ -404,6 +397,13 @@ do
404397
-- A collection of various small independent plugins/modules
405398
vim.pack.add { gh 'nvim-mini/mini.nvim' }
406399

400+
-- If a nerd font is available, load the icons module for pretty icons in various plugins.
401+
if vim.g.have_nerd_font then
402+
require('mini.icons').setup()
403+
-- Used for backwards compatibility with plugins that require `nvim-web-devicons` (e.g. telescope.nvim)
404+
MiniIcons.mock_nvim_web_devicons()
405+
end
406+
407407
-- Better Around/Inside textobjects
408408
--
409409
-- Examples:

lua/kickstart/plugins/neo-tree.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
-- Neo-tree is a Neovim plugin to browse the file system
22
-- https://github.com/nvim-neo-tree/neo-tree.nvim
33

4-
local plugins = {
4+
vim.pack.add {
55
{ src = 'https://github.com/nvim-neo-tree/neo-tree.nvim', version = vim.version.range '*' },
66
'https://github.com/nvim-lua/plenary.nvim',
77
'https://github.com/MunifTanjim/nui.nvim',
88
}
99

10-
if vim.g.have_nerd_font then
11-
table.insert(plugins, 'https://github.com/nvim-tree/nvim-web-devicons') -- not strictly required, but recommended
12-
end
13-
14-
vim.pack.add(plugins)
15-
1610
vim.keymap.set('n', '\\', '<Cmd>Neotree reveal<CR>', { desc = 'NeoTree reveal', silent = true })
1711

1812
require('neo-tree').setup {

0 commit comments

Comments
 (0)