diff options
| author | Tommaso Negri <tommaso@hey.com> | 2025-12-05 18:22:32 +0100 |
|---|---|---|
| committer | Tommaso Negri <tommaso@hey.com> | 2025-12-05 18:22:32 +0100 |
| commit | 722a868549d34d6a6f7947ffd7152a4c7e772824 (patch) | |
| tree | 01c243bca767ead545778fa68fd21e0e34cee9b8 | |
| parent | f9e2bdfd8285107572a356646b0a70d5a03136e7 (diff) | |
| download | voltage-722a868549d34d6a6f7947ffd7152a4c7e772824.tar.gz voltage-722a868549d34d6a6f7947ffd7152a4c7e772824.zip | |
Rename colorscheme to Voltage
| -rw-r--r-- | colors/mycolortheme.lua | 1 | ||||
| -rw-r--r-- | colors/voltage.lua | 1 | ||||
| -rw-r--r-- | lua/voltage/highlights/editor.lua (renamed from lua/mycolortheme/highlights/editor.lua) | 0 | ||||
| -rw-r--r-- | lua/voltage/highlights/languages/ruby.lua (renamed from lua/mycolortheme/highlights/languages/ruby.lua) | 0 | ||||
| -rw-r--r-- | lua/voltage/highlights/plugins/blink.lua (renamed from lua/mycolortheme/highlights/plugins/blink.lua) | 0 | ||||
| -rw-r--r-- | lua/voltage/highlights/plugins/fzf.lua (renamed from lua/mycolortheme/highlights/plugins/fzf.lua) | 0 | ||||
| -rw-r--r-- | lua/voltage/highlights/plugins/mini.lua (renamed from lua/mycolortheme/highlights/plugins/mini.lua) | 0 | ||||
| -rw-r--r-- | lua/voltage/highlights/plugins/netrw.lua (renamed from lua/mycolortheme/highlights/plugins/netrw.lua) | 0 | ||||
| -rw-r--r-- | lua/voltage/highlights/syntax.lua (renamed from lua/mycolortheme/highlights/syntax.lua) | 0 | ||||
| -rw-r--r-- | lua/voltage/highlights/treesitter.lua (renamed from lua/mycolortheme/highlights/treesitter.lua) | 0 | ||||
| -rw-r--r-- | lua/voltage/init.lua (renamed from lua/mycolortheme/init.lua) | 30 | ||||
| -rw-r--r-- | tests/lua.lua | 2 |
12 files changed, 20 insertions, 14 deletions
diff --git a/colors/mycolortheme.lua b/colors/mycolortheme.lua deleted file mode 100644 index c298b0d..0000000 --- a/colors/mycolortheme.lua +++ /dev/null @@ -1 +0,0 @@ -require("mycolortheme").setup() diff --git a/colors/voltage.lua b/colors/voltage.lua new file mode 100644 index 0000000..3a66fe9 --- /dev/null +++ b/colors/voltage.lua @@ -0,0 +1 @@ +require("voltage").setup() diff --git a/lua/mycolortheme/highlights/editor.lua b/lua/voltage/highlights/editor.lua index b469e15..b469e15 100644 --- a/lua/mycolortheme/highlights/editor.lua +++ b/lua/voltage/highlights/editor.lua diff --git a/lua/mycolortheme/highlights/languages/ruby.lua b/lua/voltage/highlights/languages/ruby.lua index 04f5b14..04f5b14 100644 --- a/lua/mycolortheme/highlights/languages/ruby.lua +++ b/lua/voltage/highlights/languages/ruby.lua diff --git a/lua/mycolortheme/highlights/plugins/blink.lua b/lua/voltage/highlights/plugins/blink.lua index 3afd10f..3afd10f 100644 --- a/lua/mycolortheme/highlights/plugins/blink.lua +++ b/lua/voltage/highlights/plugins/blink.lua diff --git a/lua/mycolortheme/highlights/plugins/fzf.lua b/lua/voltage/highlights/plugins/fzf.lua index 80b2023..80b2023 100644 --- a/lua/mycolortheme/highlights/plugins/fzf.lua +++ b/lua/voltage/highlights/plugins/fzf.lua diff --git a/lua/mycolortheme/highlights/plugins/mini.lua b/lua/voltage/highlights/plugins/mini.lua index 431bfec..431bfec 100644 --- a/lua/mycolortheme/highlights/plugins/mini.lua +++ b/lua/voltage/highlights/plugins/mini.lua diff --git a/lua/mycolortheme/highlights/plugins/netrw.lua b/lua/voltage/highlights/plugins/netrw.lua index 4965cf5..4965cf5 100644 --- a/lua/mycolortheme/highlights/plugins/netrw.lua +++ b/lua/voltage/highlights/plugins/netrw.lua diff --git a/lua/mycolortheme/highlights/syntax.lua b/lua/voltage/highlights/syntax.lua index 1110521..1110521 100644 --- a/lua/mycolortheme/highlights/syntax.lua +++ b/lua/voltage/highlights/syntax.lua diff --git a/lua/mycolortheme/highlights/treesitter.lua b/lua/voltage/highlights/treesitter.lua index 491b2f2..491b2f2 100644 --- a/lua/mycolortheme/highlights/treesitter.lua +++ b/lua/voltage/highlights/treesitter.lua diff --git a/lua/mycolortheme/init.lua b/lua/voltage/init.lua index 09a7783..6b70223 100644 --- a/lua/mycolortheme/init.lua +++ b/lua/voltage/init.lua @@ -1,11 +1,17 @@ local M = {} -function M.setup(config) +M.config = { + accent = "blue" +} + +function M.setup(opts) + M.config = vim.tbl_deep_extend("force", M.config, opts or {}) + vim.cmd("highlight clear") vim.cmd("syntax reset") - vim.o.background = config.style - vim.g.colors_name = "my color theme" + vim.o.background = "dark" + vim.g.colors_name = "voltage" local colors = { bg = nil, @@ -50,26 +56,26 @@ function M.setup(config) } for _, highlight in ipairs({ "editor", "syntax", "treesitter" }) do - local mod = require("mycolortheme.highlights." .. highlight) + local mod = require("voltage.highlights." .. highlight) - for group, opts in pairs(mod.setup(colors, config)) do - vim.api.nvim_set_hl(0, group, opts) + for group, group_opts in pairs(mod.setup(colors, M.config)) do + vim.api.nvim_set_hl(0, group, group_opts) end end for _, highlight in ipairs({ "ruby" }) do - local mod = require("mycolortheme.highlights.languages." .. highlight) + local mod = require("voltage.highlights.languages." .. highlight) - for group, opts in pairs(mod.setup(colors, config)) do - vim.api.nvim_set_hl(0, group, opts) + for group, group_opts in pairs(mod.setup(colors, M.config)) do + vim.api.nvim_set_hl(0, group, group_opts) end end for _, highlight in ipairs({ "netrw", "fzf", "blink", "mini" }) do - local mod = require("mycolortheme.highlights.plugins." .. highlight) + local mod = require("voltage.highlights.plugins." .. highlight) - for group, opts in pairs(mod.setup(colors, config)) do - vim.api.nvim_set_hl(0, group, opts) + for group, group_opts in pairs(mod.setup(colors, M.config)) do + vim.api.nvim_set_hl(0, group, group_opts) end end end diff --git a/tests/lua.lua b/tests/lua.lua index 1c4ab1e..a2443a0 100644 --- a/tests/lua.lua +++ b/tests/lua.lua @@ -10,7 +10,7 @@ vim.pack.add({ }) require("plugins.alabaster") -require("plugins.mycolortheme") +require("plugins.voltage") require("plugins.mason") require("plugins.treesitter") require("plugins.fzf") |
