Comments (9)
In case someone is looking for this, here is what I did (thanks to @kyazdani42) that works just fine:
local nvim_web_devicons = require "nvim-web-devicons"
local current_icons = nvim_web_devicons.get_icons()
local new_icons = {}
for key, icon in pairs(current_icons) do
icon.color = "#ff0088"
icon.cterm_color = 198
new_icons[key] = icon
end
nvim_web_devicons.set_icon(new_icons)
from nvim-web-devicons.
@kyazdani42 I did, sorry for the late response, I meant to open this sooner, but it slipped my mind. :)
from nvim-web-devicons.
you could write a method to get the list of all highlight groups that start with DevIcon and mapping the color you want to them in a loop.
from nvim-web-devicons.
or see #102 (comment)
and adapt the code to only change the color of the icon
from nvim-web-devicons.
@kyazdani42 Thank you this is really helpful, will see what I can do.
from nvim-web-devicons.
@kyazdani42 would you have an idea why when I go ahead and set the highlight group of a DevIcon doesn't appear to affect the icon colors of nvim-tree?
So I have a color scheme (.vim) and I'm trying to set the colors there (instead of hard coding this in my config).
If I call :hi DevIconLua guifg=#ff0088
as a command it seems to be working, but when I set it in my theme it doesn't. (if I set hi NvimTreeFolderIcon guifg=#ffffff
in my theme file for example, it works). Does it have something to do with the order of things being loaded? Are the values in my theme file being overwritten perhaps?
Sorry for the newbish questions. Thanks for helping out.
from nvim-web-devicons.
I think it's a bug actually, nvim-web-devicons override predefined sets of colors when running the highlight while nvim-tree doesn't.
Can you try removing the exclamation mark at line 1260 in lua/nvim-web-devicons.lua and try again ? It might work. If so open a PR :)
from nvim-web-devicons.
@kyazdani42 I'm guessing you mean line 1264, which goes like this:
local highlight_command = "highlight! "..hl_group
I've tried removing the exclamation mark, but unfortunately it didn't work. :(
from nvim-web-devicons.
Could you open a new issue so we can track this properly please :) ?
from nvim-web-devicons.
Related Issues (20)
- TOML icon broken HOT 7
- Are you open to a PR for adding operating system icons? HOT 5
- Package-lock.json file name causes error HOT 3
- Outdated Terraform file icon
- New JS icon is not legible/recognizable in small size HOT 11
- Question - Where to find / edit git icons. Maybe not part of this codebase?
- Icons for C++20 module files doent work HOT 1
- Consolidate Default Icon Set: Seti HOT 1
- Material Icon Set
- Highlight Error HOT 4
- Haxe icon not showing HOT 2
- Add mp3 file icons HOT 4
- No way to add/override icons for filetypes HOT 4
- Add openscad icon HOT 1
- Rename `:NvimWebDeviconsHiTest` to anything else like `WebDeviconsHiTest` HOT 8
- Regression: `NvimWebDeviconsHiTest` crashes HOT 5
- Missing icon for Java HOT 2
- :help HOT 1
- Some icons not show correctly HOT 2
- Incorrect NF symbol shown for Rust HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-web-devicons.