From a148e3744f9a066d2f222f44662b3e9886dae78c Mon Sep 17 00:00:00 2001 From: triethyl Date: Mon, 28 Jul 2025 15:24:35 -0400 Subject: reworked neovim colorschemes --- pkgs/custom-neovim/config/lua/colorscheme.lua | 34 ---------------------- pkgs/custom-neovim/config/lua/colorschemes.lua | 8 +++++ .../config/lua/colorschemes/carbonfox.lua | 25 ++++++++++++++++ 3 files changed, 33 insertions(+), 34 deletions(-) delete mode 100644 pkgs/custom-neovim/config/lua/colorscheme.lua create mode 100644 pkgs/custom-neovim/config/lua/colorschemes.lua create mode 100644 pkgs/custom-neovim/config/lua/colorschemes/carbonfox.lua (limited to 'pkgs') 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, +}) -- cgit v1.2.3