Closed nizamiza closed 1 year ago
You can achieve what you want by tweaking the icon component. For instance, to get rid off the file icons:
filesystem = {
components = {
icon = function(config, node, state)
if node.type == 'file' then return {} end
return require('neo-tree.sources.common.components').icon(config, node, state)
end,
},
},
You can achieve what you want by tweaking the icon component. For instance, to get rid off the file icons:
filesystem = { components = { icon = function(config, node, state) if node.type == 'file' then return {} end return require('neo-tree.sources.common.components').icon(config, node, state) end, }, },
It worked for the file icons, but I think it's still using icons for the folder collapse/expand:
Here is my updated config:
Ok, I got rid of those as well by setting the expander_collapsed
and expander_expanded
options of the indent
node to custom values. Using the default config helped in finding this (:lua require("neo-tree").paste_default_config()
).
I will leave my config for iconless NeoTree here, in case somebody needs it in the future.
Hey @soifou this is awesome, but i have one further question... i love how it looks by default if you dont have dev icons installed, with a blue *
mark before the filename
How can I get this back, with the astricks being colored like the default?
Unfortunately i have to have dev icons for other parts of my config in one area where i need it, so i cant leave it disabled, but when its enabled it activates it for neo-tree
@9mm, I guess this should work:
icon = function(config, node, state)
if node.type == 'file' then
return {
text = "* ",
highlight = config.highlight,
}
end
return require('neo-tree.sources.common.components').icon(config, node, state)
end,
dude......... awesome........ thank you
Slight update to @soifou snippet, to remove folder and file icons
filesystem = {
components = {
icon = function(config, node, state)
if node.type == 'file' or node.type == 'directory' then return {} end
return require('neo-tree.sources.common.components').icon(config, node, state)
end,
},
}
I'm pretty sure this worked a while ago, but I can't seem to be able to disable icons on a fresh install of LazyVim with NeoTree. Here is my config:
NeoTree config
```lua return { "nvim-neo-tree/neo-tree.nvim", dependencies = { "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim" }, keys = { { "And here is how I see icons:
Screenshot