Skip to content

Commit

Permalink
⚰️ Updating deps for neo-tree using nvim-webdevicons
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoCiccarino committed Jan 19, 2025
1 parent c896c6d commit a19e866
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 57 deletions.
1 change: 1 addition & 0 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"nvim-notify": { "branch": "master", "commit": "a3020c2cf4dfc4c4f390c4a21e84e35e46cf5d17" },
"nvim-treesitter": { "branch": "master", "commit": "fd59f984416f696d85119fd4d15ce0965b179944" },
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
"nvim-web-devicons": { "branch": "master", "commit": "aafa5c187a15701a7299a392b907ec15d9a7075f" },
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
Expand Down
30 changes: 16 additions & 14 deletions lua/fastvim/configs/neo-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,25 @@ return {
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"BrunoCiccarino/neokinds",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
cmd = "Neotree",
keys = {
{ "\\", ":Neotree reveal<CR>", desc = "NeoTree reveal", silent = true },
{ "<C-n>", ":Neotree toggle<CR>", desc = "Toggle NeoTree", silent = true },
},
-- Did it this way so i dont need to change it too much now
-- TODO: We should probably take a look into this later
opts = function()
local neokinds = require "neokinds"
return {
opts = {
options = {
close_if_last_window = false,
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
default_component_configs = {
icon = {
folder_closed = neokinds.config.icons.folders.closed,
folder_open = neokinds.config.icons.folders.open,
folder_empty = neokinds.config.icons.folders.empty,
default = neokinds.config.icons.files.default,
folder_closed = "",
folder_open = "",
folder_empty = "",
default = "",
},
},
filesystem = {
Expand All @@ -33,7 +30,12 @@ return {
},
components = {
icon = function(config, node, state)
return neokinds.icon(config, node, state)
local webdevicons = require "nvim-web-devicons"
local icon, icon_color = webdevicons.get_icon_color(node.name, node.ext, { default = true })
return {
text = icon or config.default,
highlight = icon_color and { fg = icon_color } or nil,
}
end,
},
window = {
Expand All @@ -42,6 +44,6 @@ return {
},
},
},
}
end,
},
},
}
43 changes: 0 additions & 43 deletions lua/fastvim/configs/nerd-tree.lua

This file was deleted.

0 comments on commit a19e866

Please sign in to comment.