2021-07-17 11:14:52 +00:00
|
|
|
|
local present, icons = pcall(require, "nvim-web-devicons")
|
|
|
|
|
if not present then
|
2021-08-16 07:49:09 +00:00
|
|
|
|
return
|
2021-07-15 15:43:17 +00:00
|
|
|
|
end
|
2021-07-09 03:44:04 +00:00
|
|
|
|
|
2022-01-21 11:49:49 +00:00
|
|
|
|
local default = {
|
|
|
|
|
colors = require("colors").get(),
|
|
|
|
|
}
|
2021-07-09 03:44:04 +00:00
|
|
|
|
|
2022-01-21 11:49:49 +00:00
|
|
|
|
default = {
|
2021-08-16 07:49:09 +00:00
|
|
|
|
override = {
|
2021-08-19 18:58:42 +00:00
|
|
|
|
c = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.blue,
|
2021-08-19 18:58:42 +00:00
|
|
|
|
name = "c",
|
|
|
|
|
},
|
2021-08-16 07:49:09 +00:00
|
|
|
|
css = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.blue,
|
2021-08-16 07:49:09 +00:00
|
|
|
|
name = "css",
|
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
deb = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.cyan,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "deb",
|
2021-08-16 07:49:09 +00:00
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
Dockerfile = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.cyan,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "Dockerfile",
|
2021-08-16 07:49:09 +00:00
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
html = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.baby_pink,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "html",
|
2021-08-16 07:49:09 +00:00
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
jpeg = {
|
2021-08-16 07:49:09 +00:00
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.dark_purple,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "jpeg",
|
2021-08-16 07:49:09 +00:00
|
|
|
|
},
|
|
|
|
|
jpg = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.dark_purple,
|
2021-08-16 07:49:09 +00:00
|
|
|
|
name = "jpg",
|
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
js = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.sun,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "js",
|
|
|
|
|
},
|
|
|
|
|
kt = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.orange,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "kt",
|
|
|
|
|
},
|
|
|
|
|
lock = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.red,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "lock",
|
|
|
|
|
},
|
|
|
|
|
lua = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.blue,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "lua",
|
2021-08-16 07:49:09 +00:00
|
|
|
|
},
|
|
|
|
|
mp3 = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.white,
|
2021-08-16 07:49:09 +00:00
|
|
|
|
name = "mp3",
|
|
|
|
|
},
|
|
|
|
|
mp4 = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.white,
|
2021-08-16 07:49:09 +00:00
|
|
|
|
name = "mp4",
|
|
|
|
|
},
|
|
|
|
|
out = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.white,
|
2021-08-16 07:49:09 +00:00
|
|
|
|
name = "out",
|
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
png = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.dark_purple,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "png",
|
2021-08-16 07:49:09 +00:00
|
|
|
|
},
|
|
|
|
|
py = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.cyan,
|
2021-08-16 07:49:09 +00:00
|
|
|
|
name = "py",
|
|
|
|
|
},
|
2021-10-14 05:27:28 +00:00
|
|
|
|
["robots.txt"] = {
|
|
|
|
|
icon = "ﮧ",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.red,
|
2021-10-14 05:27:28 +00:00
|
|
|
|
name = "robots",
|
|
|
|
|
},
|
2021-08-16 07:49:09 +00:00
|
|
|
|
toml = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.blue,
|
2021-08-16 07:49:09 +00:00
|
|
|
|
name = "toml",
|
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
ts = {
|
|
|
|
|
icon = "ﯤ",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.teal,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "ts",
|
2021-08-16 07:49:09 +00:00
|
|
|
|
},
|
2021-10-14 05:27:28 +00:00
|
|
|
|
ttf = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.white,
|
2021-10-14 05:27:28 +00:00
|
|
|
|
name = "TrueTypeFont",
|
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
rb = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.pink,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "rb",
|
2021-08-16 07:49:09 +00:00
|
|
|
|
},
|
|
|
|
|
rpm = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.orange,
|
2021-08-16 07:49:09 +00:00
|
|
|
|
name = "rpm",
|
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
vue = {
|
|
|
|
|
icon = "﵂",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.vibrant_green,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "vue",
|
|
|
|
|
},
|
2021-10-14 05:27:28 +00:00
|
|
|
|
woff = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.white,
|
2021-10-14 05:27:28 +00:00
|
|
|
|
name = "WebOpenFontFormat",
|
|
|
|
|
},
|
|
|
|
|
woff2 = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.white,
|
2021-10-14 05:27:28 +00:00
|
|
|
|
name = "WebOpenFontFormat2",
|
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
|
xz = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.sun,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "xz",
|
|
|
|
|
},
|
|
|
|
|
zip = {
|
|
|
|
|
icon = "",
|
2022-01-21 11:49:49 +00:00
|
|
|
|
color = default.colors.sun,
|
2021-08-22 07:49:15 +00:00
|
|
|
|
name = "zip",
|
2021-08-16 07:49:09 +00:00
|
|
|
|
},
|
2022-01-21 11:49:49 +00:00
|
|
|
|
},
|
2021-07-15 15:43:17 +00:00
|
|
|
|
}
|
2022-01-21 00:26:05 +00:00
|
|
|
|
|
2022-01-21 11:49:49 +00:00
|
|
|
|
local M = {}
|
2022-01-21 00:26:05 +00:00
|
|
|
|
M.setup = function(override_flag)
|
|
|
|
|
if override_flag then
|
2022-01-21 11:49:49 +00:00
|
|
|
|
default = require("core.utils").tbl_override_req("nvim_web_devicons", default)
|
2022-01-21 00:26:05 +00:00
|
|
|
|
end
|
2022-01-21 11:49:49 +00:00
|
|
|
|
icons.setup(default)
|
2022-01-21 00:26:05 +00:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return M
|