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
This commit is contained in:
parent
82211ed829
commit
bccd8e4ab9
10 changed files with 338 additions and 317 deletions
|
|
@ -3,156 +3,156 @@ if not present then
|
|||
return
|
||||
end
|
||||
|
||||
local M = {}
|
||||
local default = {
|
||||
colors = require("colors").get(),
|
||||
}
|
||||
|
||||
local colors = require("colors").get()
|
||||
|
||||
local chad_defaults = {
|
||||
default = {
|
||||
override = {
|
||||
c = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
color = default.colors.blue,
|
||||
name = "c",
|
||||
},
|
||||
css = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
color = default.colors.blue,
|
||||
name = "css",
|
||||
},
|
||||
deb = {
|
||||
icon = "",
|
||||
color = colors.cyan,
|
||||
color = default.colors.cyan,
|
||||
name = "deb",
|
||||
},
|
||||
Dockerfile = {
|
||||
icon = "",
|
||||
color = colors.cyan,
|
||||
color = default.colors.cyan,
|
||||
name = "Dockerfile",
|
||||
},
|
||||
html = {
|
||||
icon = "",
|
||||
color = colors.baby_pink,
|
||||
color = default.colors.baby_pink,
|
||||
name = "html",
|
||||
},
|
||||
jpeg = {
|
||||
icon = "",
|
||||
color = colors.dark_purple,
|
||||
color = default.colors.dark_purple,
|
||||
name = "jpeg",
|
||||
},
|
||||
jpg = {
|
||||
icon = "",
|
||||
color = colors.dark_purple,
|
||||
color = default.colors.dark_purple,
|
||||
name = "jpg",
|
||||
},
|
||||
js = {
|
||||
icon = "",
|
||||
color = colors.sun,
|
||||
color = default.colors.sun,
|
||||
name = "js",
|
||||
},
|
||||
kt = {
|
||||
icon = "",
|
||||
color = colors.orange,
|
||||
color = default.colors.orange,
|
||||
name = "kt",
|
||||
},
|
||||
lock = {
|
||||
icon = "",
|
||||
color = colors.red,
|
||||
color = default.colors.red,
|
||||
name = "lock",
|
||||
},
|
||||
lua = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
color = default.colors.blue,
|
||||
name = "lua",
|
||||
},
|
||||
mp3 = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
color = default.colors.white,
|
||||
name = "mp3",
|
||||
},
|
||||
mp4 = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
color = default.colors.white,
|
||||
name = "mp4",
|
||||
},
|
||||
out = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
color = default.colors.white,
|
||||
name = "out",
|
||||
},
|
||||
png = {
|
||||
icon = "",
|
||||
color = colors.dark_purple,
|
||||
color = default.colors.dark_purple,
|
||||
name = "png",
|
||||
},
|
||||
py = {
|
||||
icon = "",
|
||||
color = colors.cyan,
|
||||
color = default.colors.cyan,
|
||||
name = "py",
|
||||
},
|
||||
["robots.txt"] = {
|
||||
icon = "ﮧ",
|
||||
color = colors.red,
|
||||
color = default.colors.red,
|
||||
name = "robots",
|
||||
},
|
||||
toml = {
|
||||
icon = "",
|
||||
color = colors.blue,
|
||||
color = default.colors.blue,
|
||||
name = "toml",
|
||||
},
|
||||
ts = {
|
||||
icon = "ﯤ",
|
||||
color = colors.teal,
|
||||
color = default.colors.teal,
|
||||
name = "ts",
|
||||
},
|
||||
ttf = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
color = default.colors.white,
|
||||
name = "TrueTypeFont",
|
||||
},
|
||||
rb = {
|
||||
icon = "",
|
||||
color = colors.pink,
|
||||
color = default.colors.pink,
|
||||
name = "rb",
|
||||
},
|
||||
rpm = {
|
||||
icon = "",
|
||||
color = colors.orange,
|
||||
color = default.colors.orange,
|
||||
name = "rpm",
|
||||
},
|
||||
vue = {
|
||||
icon = "﵂",
|
||||
color = colors.vibrant_green,
|
||||
color = default.colors.vibrant_green,
|
||||
name = "vue",
|
||||
},
|
||||
woff = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
color = default.colors.white,
|
||||
name = "WebOpenFontFormat",
|
||||
},
|
||||
woff2 = {
|
||||
icon = "",
|
||||
color = colors.white,
|
||||
color = default.colors.white,
|
||||
name = "WebOpenFontFormat2",
|
||||
},
|
||||
xz = {
|
||||
icon = "",
|
||||
color = colors.sun,
|
||||
color = default.colors.sun,
|
||||
name = "xz",
|
||||
},
|
||||
zip = {
|
||||
icon = "",
|
||||
color = colors.sun,
|
||||
color = default.colors.sun,
|
||||
name = "zip",
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
local M = {}
|
||||
M.setup = function(override_flag)
|
||||
if override_flag then
|
||||
chad_defaults = require("core.utils").tbl_override_req("nvim_web_devicons", chad_defaults)
|
||||
default = require("core.utils").tbl_override_req("nvim_web_devicons", default)
|
||||
end
|
||||
icons.setup(chad_defaults)
|
||||
icons.setup(default)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue