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 | |
| parent | 81e7ddbd48a9f1fa0039b6728f5f23ece0307900 (diff) | |
| download | nvim-conf-7e62950549047548c2744b634d5947da67647881.tar.gz nvim-conf-7e62950549047548c2744b634d5947da67647881.zip | |
feat: improve colorscheme management
| -rw-r--r-- | after/plugin/cmp.lua | 2 | ||||
| -rw-r--r-- | after/plugin/lualine.lua | 2 | ||||
| -rw-r--r-- | after/plugin/nightfox.lua | 32 | ||||
| -rw-r--r-- | after/plugin/tokio.lua | 10 | ||||
| -rw-r--r-- | init.lua | 1 | ||||
| -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 | ||||
| -rw-r--r-- | lua/alpha/neovide.lua | 9 | ||||
| -rw-r--r-- | lua/alpha/plugins.lua | 3 | ||||
| -rw-r--r-- | lua/alpha/settings.lua | 3 |
12 files changed, 91 insertions, 50 deletions
diff --git a/after/plugin/cmp.lua b/after/plugin/cmp.lua index 3dcefd5..8e980d1 100644 --- a/after/plugin/cmp.lua +++ b/after/plugin/cmp.lua @@ -133,7 +133,7 @@ cmp.setup.filetype({ "dap-repl", "dapui_watches" }, { }) -- Setup lspconfig. -local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()) +local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled. require("lspconfig")["emmet_ls"].setup({ capabilities = capabilities, diff --git a/after/plugin/lualine.lua b/after/plugin/lualine.lua index 12f276c..50886aa 100644 --- a/after/plugin/lualine.lua +++ b/after/plugin/lualine.lua @@ -5,7 +5,7 @@ end lualine.setup({ options = { - theme = "tokyonight", + theme = vim.g.alpha_lualine_color, icons_enabled = true, globalstatus = true, }, diff --git a/after/plugin/nightfox.lua b/after/plugin/nightfox.lua deleted file mode 100644 index ce31634..0000000 --- a/after/plugin/nightfox.lua +++ /dev/null @@ -1,32 +0,0 @@ -local ok, nightfox = pcall(require, "nightfox") -if not ok then - return -end - -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") diff --git a/after/plugin/tokio.lua b/after/plugin/tokio.lua deleted file mode 100644 index 04c566e..0000000 --- a/after/plugin/tokio.lua +++ /dev/null @@ -1,10 +0,0 @@ -local ok, tokyonight = pcall(require, "tokyonight") -if not ok then - return -end - -tokyonight.setup({ - style="night" -}) - -vim.cmd.colorscheme("tokyonight") @@ -13,3 +13,4 @@ require("alpha.telescope.setup") require("alpha.telescope.mappings") require("alpha.dap") require("alpha.neovide") +require("alpha.colors") 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, +} diff --git a/lua/alpha/neovide.lua b/lua/alpha/neovide.lua index a283314..1e419d3 100644 --- a/lua/alpha/neovide.lua +++ b/lua/alpha/neovide.lua @@ -1,8 +1,7 @@ -local default_font = "JetbrainsMono Nerd Font" +local default_font = "VictorMono Nerd Font:b" local default_size = 14; vim.g.neovide_transparency = 0.9 -vim.o.guifont="JetbrainsMono Nerd Font:h20" vim.g.neovide_hide_mouse_when_typing = true local function set_font(font, size) @@ -18,9 +17,9 @@ local maps = { f0 = 14, f1 = 15, f2 = 16, - f3 = 17, - f4 = 18, - f5 = 19, + f3 = 18, + f4 = 20, + f5 = 22, } for key, value in pairs(maps) do diff --git a/lua/alpha/plugins.lua b/lua/alpha/plugins.lua index 357a667..0e1584f 100644 --- a/lua/alpha/plugins.lua +++ b/lua/alpha/plugins.lua @@ -172,8 +172,9 @@ return require("packer").startup(function(use) use("rcarriga/nvim-notify") - -- use("EdenEast/nightfox.nvim") + use("EdenEast/nightfox.nvim") use("folke/tokyonight.nvim") + use("wuelnerdotexe/vim-enfocado") use("Raimondi/delimitMate") use("tpope/vim-surround") diff --git a/lua/alpha/settings.lua b/lua/alpha/settings.lua index b9cd1e2..567534b 100644 --- a/lua/alpha/settings.lua +++ b/lua/alpha/settings.lua @@ -1,6 +1,9 @@ vim.g.mapleader = " " vim.g.snippets = "luasnip" +vim.g.alpha_color = "enfocado" +vim.g.alpha_lualine_color = "enfocado" + local options = vim.o options.number = true |