From 7e62950549047548c2744b634d5947da67647881 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Sat, 15 Oct 2022 11:59:24 +0200 Subject: feat: improve colorscheme management --- lua/alpha/colors/init.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lua/alpha/colors/init.lua (limited to 'lua/alpha/colors/init.lua') diff --git a/lua/alpha/colors/init.lua b/lua/alpha/colors/init.lua new file mode 100644 index 0000000..3d1da4c --- /dev/null +++ b/lua/alpha/colors/init.lua @@ -0,0 +1,19 @@ +local color = vim.g.alpha_color + +if color == nil then + print("No color configure, set vim.g.alpha_color and ensure the file exists on the color folder") + return +end + +local ok, colorClass = pcall(require, "alpha.colors."..color) +if not ok then + print("No setup class for color " .. color) + return +end + +if type(colorClass.setup) ~= "function" then + print("method setup non existing") + return +end + +colorClass.setup() -- cgit v1.2.3