diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-10-15 11:59:24 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-10-15 11:59:24 +0200 |
| commit | 7e62950549047548c2744b634d5947da67647881 (patch) | |
| tree | caa5180018a89a09c62d0dc904bf8b1ad3e686ba /lua/alpha/colors | |
| parent | 81e7ddbd48a9f1fa0039b6728f5f23ece0307900 (diff) | |
| download | nvim-conf-7e62950549047548c2744b634d5947da67647881.tar.gz nvim-conf-7e62950549047548c2744b634d5947da67647881.zip | |
feat: improve colorscheme management
Diffstat (limited to 'lua/alpha/colors')
| -rw-r--r-- | lua/alpha/colors/enfocado.lua | 7 | ||||
| -rw-r--r-- | lua/alpha/colors/init.lua | 19 | ||||
| -rw-r--r-- | lua/alpha/colors/nightfox.lua | 38 | ||||
| -rw-r--r-- | lua/alpha/colors/tokio.lua | 15 |
4 files changed, 79 insertions, 0 deletions
diff --git a/lua/alpha/colors/enfocado.lua b/lua/alpha/colors/enfocado.lua new file mode 100644 index 0000000..0961c8c --- /dev/null +++ b/lua/alpha/colors/enfocado.lua @@ -0,0 +1,7 @@ +local function setup() + vim.cmd.colorscheme("enfocado") +end + +return { + setup = setup, +} 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() diff --git a/lua/alpha/colors/nightfox.lua b/lua/alpha/colors/nightfox.lua new file mode 100644 index 0000000..bb90d09 --- /dev/null +++ b/lua/alpha/colors/nightfox.lua @@ -0,0 +1,38 @@ +local ok, nightfox = pcall(require, "nightfox") +if not ok then + return +end + +local function setup() + local palettes = { + all = { + } + } + + local groups = { + all = { + CmpItemAbbr = { fg = "fg0" }, + CmpItemAbbrDeprecated = { link = "Error" }, + CmpItemAbbrMatchFuzzy = { link = "CmpItemAbbr" }, + CmpItemKind = { link = "Special" }, + }, + } + + nightfox.setup({ + options = { + styles = { + comments = "italic", + keywords = "bold", + types = "italic,bold", + }, + }, + palettes = palettes, + groups = groups, + }) + + vim.cmd.colorscheme("duskfox") +end + +return { + setup = setup, +} diff --git a/lua/alpha/colors/tokio.lua b/lua/alpha/colors/tokio.lua new file mode 100644 index 0000000..b40fb7f --- /dev/null +++ b/lua/alpha/colors/tokio.lua @@ -0,0 +1,15 @@ +local ok, tokyonight = pcall(require, "tokyonight") +if not ok then + return +end + +local function setup() + tokyonight.setup({ + style="night" + }) + vim.cmd.colorscheme("tokyonight") +end + +return { + setup = setup, +} |