my-nvim-setup/lua/plugins/configs/icons.lua
Akianonymus bccd8e4ab9 utils: Improve override functions | Fix nvimtree and statusline config |
Misc

* make more things configurable
* use more generic variable names
* handle some edgecases
* cleanup
* format files
2022-01-22 10:15:38 +05:30

158 lines
3.3 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local present, icons = pcall(require, "nvim-web-devicons")
if not present then
return
end
local default = {
colors = require("colors").get(),
}
default = {
override = {
c = {
icon = "",
color = default.colors.blue,
name = "c",
},
css = {
icon = "",
color = default.colors.blue,
name = "css",
},
deb = {
icon = "",
color = default.colors.cyan,
name = "deb",
},
Dockerfile = {
icon = "",
color = default.colors.cyan,
name = "Dockerfile",
},
html = {
icon = "",
color = default.colors.baby_pink,
name = "html",
},
jpeg = {
icon = "",
color = default.colors.dark_purple,
name = "jpeg",
},
jpg = {
icon = "",
color = default.colors.dark_purple,
name = "jpg",
},
js = {
icon = "",
color = default.colors.sun,
name = "js",
},
kt = {
icon = "󱈙",
color = default.colors.orange,
name = "kt",
},
lock = {
icon = "",
color = default.colors.red,
name = "lock",
},
lua = {
icon = "",
color = default.colors.blue,
name = "lua",
},
mp3 = {
icon = "",
color = default.colors.white,
name = "mp3",
},
mp4 = {
icon = "",
color = default.colors.white,
name = "mp4",
},
out = {
icon = "",
color = default.colors.white,
name = "out",
},
png = {
icon = "",
color = default.colors.dark_purple,
name = "png",
},
py = {
icon = "",
color = default.colors.cyan,
name = "py",
},
["robots.txt"] = {
icon = "",
color = default.colors.red,
name = "robots",
},
toml = {
icon = "",
color = default.colors.blue,
name = "toml",
},
ts = {
icon = "",
color = default.colors.teal,
name = "ts",
},
ttf = {
icon = "",
color = default.colors.white,
name = "TrueTypeFont",
},
rb = {
icon = "",
color = default.colors.pink,
name = "rb",
},
rpm = {
icon = "",
color = default.colors.orange,
name = "rpm",
},
vue = {
icon = "",
color = default.colors.vibrant_green,
name = "vue",
},
woff = {
icon = "",
color = default.colors.white,
name = "WebOpenFontFormat",
},
woff2 = {
icon = "",
color = default.colors.white,
name = "WebOpenFontFormat2",
},
xz = {
icon = "",
color = default.colors.sun,
name = "xz",
},
zip = {
icon = "",
color = default.colors.sun,
name = "zip",
},
},
}
local M = {}
M.setup = function(override_flag)
if override_flag then
default = require("core.utils").tbl_override_req("nvim_web_devicons", default)
end
icons.setup(default)
end
return M