EdenEast / nightfox.nvim

🦊A highly customizable theme for vim and neovim with support for lsp, treesitter and a variety of plugins.
MIT License
3.15k stars 147 forks source link

Nvim-web-devicons Theming #69

Closed karimlevallois closed 1 year ago

karimlevallois commented 2 years ago

Would it be possible to add theming of the web-devicons in nvim-tree?

EdenEast commented 2 years ago

If you check the help page for nvim-tree you can find the current list of highlight groups. Currently that would be this list.

karimlevallois commented 2 years ago

I meant more of a complete thing like this (https://github.com/kabinspace/AstroVim/blob/main/lua/configs/icons.lua)

karimlevallois commented 2 years ago

`-- colours from https://github.com/EdenEast/nightfox.nvim/blob/main/lua/nightfox/colors/nordfox.lua

local M = {}

function M.config() local status_ok, icons = pcall(require, "nvim-web-devicons") if not status_ok then return end

local colors = { c = "#81a1c1", -- blue css = "#bf616a", -- red deb = "#93ccdc", -- cyan br docker = "#8aa872", -- green dm html = "#c9826b", -- orange js = "#a3be8c", -- green kt = "#b1d196", -- green br lock = "#d9b263", -- yellow dm lua = "#88c0d0", -- cyan mp3 = "#c895bf", -- magenta br mp4 = "#c895bf", -- magenta br out = "#bbc3d4", -- white dm py = "#ebcb8b", -- yellow robot = "#e7ecf4", -- white br toml = "#d092ce", -- pink br ts = "#668aab", -- blue dm ttf = "#a54e56", -- red dm rb = "#d89079", -- orange br rpm = "#d06f79", -- red br woff = "#b46950", -- orange dm woff2 = "#b46950", -- orange dm zip = "#f0d399", -- yellow br jsx = "#69a7ba", -- cyan dm vue = "#8cafd2", -- blue br rs = "#a96ca5", -- pink dm png = "#b48ead", -- magenta jpeg = "#b48ead", -- magenta jpg = "#b48ead", -- magenta }

icons.set_icon { c = { icon = "", color = colors.c, name = "c", }, css = { icon = "", color = colors.css, name = "css", }, deb = { icon = "", color = colors.deb, name = "deb", }, Dockerfile = { icon = "", color = colors.docker, name = "Dockerfile", }, html = { icon = "", color = colors.html, name = "html", }, js = { icon = "", color = colors.js, name = "js", }, kt = { icon = "󱈙", color = colors.kt, name = "kt", }, lock = { icon = "", color = colors.lock, name = "lock", }, lua = { icon = "", color = colors.lua, name = "lua", }, mp3 = { icon = "", color = colors.mp3, name = "mp3", }, mp4 = { icon = "", color = colors.mp4, name = "mp4", }, out = { icon = "", color = colors.out, name = "out", }, py = { icon = "", color = colors.py, name = "py", }, ["robots.txt"] = { icon = "ﮧ", color = colors.robot, name = "robots", }, toml = { icon = "", color = colors.toml, name = "toml", }, ts = { icon = "", color = colors.ts, name = "ts", }, ttf = { icon = "", color = colors.ttf, name = "TrueTypeFont", }, rb = { icon = "", color = colors.rb, name = "rb", }, rpm = { icon = "", color = colors.rpm, name = "rpm", }, vue = { icon = "﵂", color = colors.vue, name = "vue", }, woff = { icon = "", color = colors.woff, name = "WebOpenFontFormat", }, woff2 = { icon = "", color = colors.woff2, name = "WebOpenFontFormat2", }, xz = { icon = "", color = colors.zip, name = "xz", }, zip = { icon = "", color = colors.zip, name = "zip", }, jsx = { icon = "ﰆ", color = colors.jsx, name = "jsx", }, rust = { icon = "", color = colors.rs, name = "rs", }, jpg = { icon = "", color = colors.jpg, name = "jpg", }, png = { icon = "", color = colors.png, name = "png", }, jpeg = { icon = "", color = colors.jpeg, name = "jpeg", }, } end

return M `

karimlevallois commented 2 years ago

This sort of thing. Put this together on mine and the icons now look much better with the whole theme.

EdenEast commented 2 years ago

I see that devicons defines highlight groups. I would only set some of these highlight groups. I would not want to define the actual icons and names.

karimlevallois commented 2 years ago

Of course, it was just an example of what can be done.