Skip to content

Commit a19e866

Browse files
author
BrunoCiccarino
committed
⚰️ Updating deps for neo-tree using nvim-webdevicons
1 parent c896c6d commit a19e866

File tree

3 files changed

+17
-57
lines changed

3 files changed

+17
-57
lines changed

lazy-lock.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"nvim-notify": { "branch": "master", "commit": "a3020c2cf4dfc4c4f390c4a21e84e35e46cf5d17" },
3333
"nvim-treesitter": { "branch": "master", "commit": "fd59f984416f696d85119fd4d15ce0965b179944" },
3434
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
35+
"nvim-web-devicons": { "branch": "master", "commit": "aafa5c187a15701a7299a392b907ec15d9a7075f" },
3536
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
3637
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
3738
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },

lua/fastvim/configs/neo-tree.lua

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,25 @@ return {
33
branch = "v3.x",
44
dependencies = {
55
"nvim-lua/plenary.nvim",
6-
"BrunoCiccarino/neokinds",
6+
"nvim-tree/nvim-web-devicons",
77
"MunifTanjim/nui.nvim",
88
},
99
cmd = "Neotree",
1010
keys = {
11-
{ "\\", ":Neotree reveal<CR>", desc = "NeoTree reveal", silent = true },
11+
{ "<C-n>", ":Neotree toggle<CR>", desc = "Toggle NeoTree", silent = true },
1212
},
13-
-- Did it this way so i dont need to change it too much now
14-
-- TODO: We should probably take a look into this later
15-
opts = function()
16-
local neokinds = require "neokinds"
17-
return {
13+
opts = {
14+
options = {
1815
close_if_last_window = false,
1916
popup_border_style = "rounded",
2017
enable_git_status = true,
2118
enable_diagnostics = true,
2219
default_component_configs = {
2320
icon = {
24-
folder_closed = neokinds.config.icons.folders.closed,
25-
folder_open = neokinds.config.icons.folders.open,
26-
folder_empty = neokinds.config.icons.folders.empty,
27-
default = neokinds.config.icons.files.default,
21+
folder_closed = "",
22+
folder_open = "",
23+
folder_empty = "",
24+
default = "",
2825
},
2926
},
3027
filesystem = {
@@ -33,7 +30,12 @@ return {
3330
},
3431
components = {
3532
icon = function(config, node, state)
36-
return neokinds.icon(config, node, state)
33+
local webdevicons = require "nvim-web-devicons"
34+
local icon, icon_color = webdevicons.get_icon_color(node.name, node.ext, { default = true })
35+
return {
36+
text = icon or config.default,
37+
highlight = icon_color and { fg = icon_color } or nil,
38+
}
3739
end,
3840
},
3941
window = {
@@ -42,6 +44,6 @@ return {
4244
},
4345
},
4446
},
45-
}
46-
end,
47+
},
48+
},
4749
}

lua/fastvim/configs/nerd-tree.lua

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)