summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkgs/custom-neovim/config/lua/colorscheme.lua34
-rw-r--r--pkgs/custom-neovim/config/lua/colorschemes.lua8
-rw-r--r--pkgs/custom-neovim/config/lua/colorschemes/carbonfox.lua25
3 files changed, 33 insertions, 34 deletions
diff --git a/pkgs/custom-neovim/config/lua/colorscheme.lua b/pkgs/custom-neovim/config/lua/colorscheme.lua
deleted file mode 100644
index d15039c..0000000
--- a/pkgs/custom-neovim/config/lua/colorscheme.lua
+++ /dev/null
@@ -1,34 +0,0 @@
--- Set colorscheme.
-vim.cmd.colorscheme("carbonfox")
-
--- Set boolean to use patches.
-local correct_borderless_windows = true
-
--- Enable good colors.
-vim.o.termguicolors = true
-
--- Patches.
-local link_highlight = function(first_highlight, second_highlight)
- vim.cmd.highlight {bang = true, "link", first_highlight, second_highlight}
-end
-
-vim.api.nvim_create_autocmd({"ColorScheme", "VimEnter"}, {
- callback = function()
- -- Fixes some colorschemes having borderless floating windows.
- if correct_borderless_windows then
- link_highlight("FloatBorder", "Comment")
-
- -- Telescope-specific highlights
- link_highlight("TelescopeBorder", "Comment")
- link_highlight("TelescopeResultsTitle", "Variable")
- link_highlight("TelescopePreviewTitle", "Variable")
- link_highlight("TelescopePromptTitle", "Variable")
- link_highlight("TelescopePromptNormal", "Variable")
- link_highlight("TelescopePromptBorder", "Variable")
- link_highlight("TelescopePromptPrefix", "Variable")
-
- -- Snacks-specific highlights
- -- link_highlight("SnacksPickerDir", "SnacksPickerFile")
- end
- end,
-})
diff --git a/pkgs/custom-neovim/config/lua/colorschemes.lua b/pkgs/custom-neovim/config/lua/colorschemes.lua
new file mode 100644
index 0000000..cbbbd60
--- /dev/null
+++ b/pkgs/custom-neovim/config/lua/colorschemes.lua
@@ -0,0 +1,8 @@
+-- Set colorscheme.
+vim.cmd.colorscheme("carbonfox")
+
+-- Enable good colors.
+vim.o.termguicolors = true
+
+-- Require colorscheme patches.
+require("colorschemes.carbonfox")
diff --git a/pkgs/custom-neovim/config/lua/colorschemes/carbonfox.lua b/pkgs/custom-neovim/config/lua/colorschemes/carbonfox.lua
new file mode 100644
index 0000000..a3bba87
--- /dev/null
+++ b/pkgs/custom-neovim/config/lua/colorschemes/carbonfox.lua
@@ -0,0 +1,25 @@
+local link_highlight = Utils.link_highlight
+
+vim.api.nvim_create_autocmd({"ColorScheme", "VimEnter"}, {
+ callback = function()
+ -- Fixes some colorschemes having borderless floating windows.
+ if vim.g.colors_name == "carbonfox" then
+
+ link_highlight("VertSplit", "Variable")
+
+ -- link_highlight("FloatBorder", "Comment")
+
+ -- Telescope-specific highlights
+ -- link_highlight("TelescopeBorder", "Comment")
+ -- link_highlight("TelescopeResultsTitle", "Variable")
+ -- link_highlight("TelescopePreviewTitle", "Variable")
+ -- link_highlight("TelescopePromptTitle", "Variable")
+ -- link_highlight("TelescopePromptNormal", "Variable")
+ -- link_highlight("TelescopePromptBorder", "Variable")
+ -- link_highlight("TelescopePromptPrefix", "Variable")
+
+ -- Snacks-specific highlights
+ -- link_highlight("SnacksPickerDir", "SnacksPickerFile")
+ end
+ end,
+})