-
-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Defined Icons and Highlight Groups #1508
Comments
Icon and name colour would be separate highlight groups. A convention-over-configuration approach would be best, something like |
This comment was marked as duplicate.
This comment was marked as duplicate.
what's about this: https://github.com/uiwjs/file-icons |
file-icons looks to provide the same functionality as It doesn't appear to provide the per-directory colouring and isn't written in lua, so it's not something we could use. |
On reflection, I don't think this is functionality that Please raise a feature request at https://github.com/nvim-tree/nvim-web-devicons with a proposed |
nvim-tree/nvim-web-devicons#105
|
This comment was marked as duplicate.
This comment was marked as duplicate.
In terms of nvim-web-devicons it is now possible to override icons at runtime and setup time. Following #2415 this is more of a possibility for nvim-tree only:
User configuration needed:
Rather than complex configuration, a simple function is preferable. Something like: ---User defined highlighting and icon
---@param node Node cutdown
---@return string|nil node_hl highlight group for the node name
---@return string|nil icon_glyph glyph to replace the node's icon
---@return string|nil icon_hl highlight group for the icon
local function(node)
--- |
This comment was marked as duplicate.
This comment was marked as duplicate.
Tracked at #2948 |
Is your feature request related to a problem? Please describe.
I think it would be really great if you could have custom folder icon colors & custom folder icons depending on the name of the folder. For example, all of my folders are grey, but I would love if I could make
node_modules
folders green,pages
folders orange,dist
folders a light red, you get the idea. I think being able to change the icons too would be a bonus.Describe the solution you'd like
I think a few main highlight groups for popular folders would be great, such as
NvimTreeNodeModulesFolder
,NvimTreeUtilsFolder
,NvimTreeLuaFolder
, andNvimTreeStylesFolder
, and maybe some more. What I think would be absolutely perfect would be being able to dynamically add them for whatever name the user wants by setting it up the config, something likeDescribe alternatives you've considered
N/A
Additional context
In this picture you can see the
node_modules
folder is set to a green folder icon, andtypes
has blue folder icon. This is what I think would be awesome as a feature.The text was updated successfully, but these errors were encountered: