2024-05-23 13:51:05 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
}: let
|
|
|
|
inherit (lib.strings) optionalString;
|
2024-10-06 22:02:51 +00:00
|
|
|
inherit (lib.modules) mkDefault;
|
|
|
|
cfg = config.vim.theme;
|
2024-05-23 13:51:05 +00:00
|
|
|
in {
|
2024-10-05 13:47:33 +00:00
|
|
|
base16 = {
|
2024-10-06 22:02:51 +00:00
|
|
|
setupOpts = {
|
|
|
|
inherit (cfg) base16-colors;
|
|
|
|
};
|
2024-10-05 13:47:33 +00:00
|
|
|
};
|
2023-02-01 19:11:37 +00:00
|
|
|
onedark = {
|
2024-10-06 22:02:51 +00:00
|
|
|
setupOpts = {
|
|
|
|
style = cfg.style ? "dark";
|
|
|
|
};
|
|
|
|
setup = _: ''
|
2023-02-01 19:11:37 +00:00
|
|
|
-- OneDark theme
|
2024-10-06 22:02:51 +00:00
|
|
|
require('onedark').load()
|
2023-02-01 19:11:37 +00:00
|
|
|
'';
|
2023-02-01 21:00:48 +00:00
|
|
|
styles = ["dark" "darker" "cool" "deep" "warm" "warmer"];
|
2023-02-01 19:11:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
tokyonight = {
|
2024-10-06 22:02:51 +00:00
|
|
|
setupOpts = {
|
|
|
|
inherit (cfg) transparent;
|
|
|
|
};
|
|
|
|
setup = {style ? "night", ...}: ''
|
2023-04-18 15:10:14 +00:00
|
|
|
vim.cmd[[colorscheme tokyonight-${style}]]
|
2023-02-01 19:11:37 +00:00
|
|
|
'';
|
2023-04-18 15:10:52 +00:00
|
|
|
styles = ["day" "night" "storm" "moon"];
|
2023-02-01 19:11:37 +00:00
|
|
|
};
|
|
|
|
|
2023-04-17 23:01:51 +00:00
|
|
|
dracula = {
|
2024-10-06 22:02:51 +00:00
|
|
|
setupOpts = {
|
|
|
|
transparent_bg = cfg.transparent;
|
|
|
|
};
|
|
|
|
setup = _: ''
|
2023-04-17 23:01:51 +00:00
|
|
|
require('dracula').load();
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
catppuccin = {
|
2024-10-06 22:02:51 +00:00
|
|
|
setupOpts = {
|
|
|
|
flavour = cfg.style ? "mocha";
|
|
|
|
transparent_background = cfg.transparent;
|
|
|
|
term_colors = mkDefault true;
|
|
|
|
integrations = {
|
|
|
|
nvimtree = {
|
|
|
|
enabled = mkDefault true;
|
|
|
|
transparent_panel = cfg.transparent;
|
|
|
|
show_root = mkDefault true;
|
|
|
|
};
|
2023-02-01 21:00:48 +00:00
|
|
|
|
2024-10-06 22:02:51 +00:00
|
|
|
hop = mkDefault true;
|
|
|
|
gitsigns = mkDefault true;
|
|
|
|
telescope = mkDefault true;
|
|
|
|
treesitter = mkDefault true;
|
|
|
|
treesitter_context = mkDefault true;
|
|
|
|
ts_rainbow = mkDefault true;
|
|
|
|
fidget = mkDefault true;
|
|
|
|
alpha = mkDefault true;
|
|
|
|
leap = mkDefault true;
|
|
|
|
markdown = mkDefault true;
|
|
|
|
noice = mkDefault true;
|
|
|
|
# nvim-notify
|
|
|
|
notify = mkDefault true;
|
|
|
|
which_key = mkDefault true;
|
|
|
|
navic = {
|
|
|
|
enabled = mkDefault true;
|
|
|
|
# lualine will set backgound to mantle
|
|
|
|
custom_bg = "NONE";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
setup = _: ''
|
|
|
|
-- Catppuccin theme
|
2023-02-01 19:11:37 +00:00
|
|
|
-- setup must be called before loading
|
|
|
|
vim.cmd.colorscheme "catppuccin"
|
|
|
|
'';
|
2023-02-01 21:00:48 +00:00
|
|
|
styles = ["latte" "frappe" "macchiato" "mocha"];
|
2023-02-01 19:11:37 +00:00
|
|
|
};
|
2023-10-20 22:19:29 +00:00
|
|
|
|
|
|
|
oxocarbon = {
|
2024-10-06 22:02:51 +00:00
|
|
|
setupOpts = {};
|
|
|
|
setup = _: ''
|
2024-05-23 13:51:05 +00:00
|
|
|
require('oxocarbon')
|
2024-10-06 22:02:51 +00:00
|
|
|
vim.opt.background = "${cfg.style ? "dark"}"
|
2024-05-23 13:51:05 +00:00
|
|
|
vim.cmd.colorscheme = "oxocarbon"
|
2024-10-06 22:02:51 +00:00
|
|
|
${optionalString cfg.transparent ''
|
2024-05-23 13:51:05 +00:00
|
|
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
|
|
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
|
|
|
vim.api.nvim_set_hl(0, "LineNr", { bg = "none" })
|
|
|
|
vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" })
|
2024-05-25 17:37:51 +00:00
|
|
|
${optionalString config.vim.filetree.nvimTree.enable ''
|
2024-05-23 13:51:05 +00:00
|
|
|
vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" })
|
|
|
|
''}
|
|
|
|
''}
|
2023-10-20 22:19:29 +00:00
|
|
|
'';
|
|
|
|
styles = ["dark" "light"];
|
|
|
|
};
|
2024-01-17 20:08:36 +00:00
|
|
|
|
|
|
|
gruvbox = {
|
2024-10-06 22:02:51 +00:00
|
|
|
setupOpts = {
|
|
|
|
transparent_mode = cfg.transparent;
|
|
|
|
# add neovim terminal colors
|
|
|
|
terminal_colors = mkDefault true;
|
|
|
|
undercurl = mkDefault true;
|
|
|
|
underline = mkDefault true;
|
|
|
|
bold = mkDefault true;
|
|
|
|
italic = {
|
|
|
|
strings = mkDefault true;
|
|
|
|
emphasis = mkDefault true;
|
|
|
|
comments = mkDefault true;
|
|
|
|
operators = mkDefault false;
|
|
|
|
folds = mkDefault true;
|
|
|
|
};
|
|
|
|
strikethrough = mkDefault true;
|
|
|
|
invert_selection = mkDefault false;
|
|
|
|
invert_signs = mkDefault false;
|
|
|
|
invert_tabline = mkDefault false;
|
|
|
|
invert_intend_guides = mkDefault false;
|
|
|
|
inverse = mkDefault true;
|
|
|
|
contrast = "";
|
|
|
|
palette_overrides = {};
|
|
|
|
overrides = {};
|
|
|
|
dim_inactive = mkDefault false;
|
|
|
|
};
|
|
|
|
setup = _: ''
|
2024-01-17 20:08:36 +00:00
|
|
|
-- Gruvbox theme
|
2024-10-06 22:02:51 +00:00
|
|
|
vim.o.background = "${cfg.style ? "dark"}"
|
2024-01-17 20:08:36 +00:00
|
|
|
vim.cmd("colorscheme gruvbox")
|
|
|
|
'';
|
|
|
|
styles = ["dark" "light"];
|
|
|
|
};
|
2024-02-13 20:41:13 +00:00
|
|
|
rose-pine = {
|
2024-10-06 22:02:51 +00:00
|
|
|
setupOpts = {
|
|
|
|
dark_variant = cfg.style ? "main";
|
|
|
|
dim_inactive_windows = mkDefault false;
|
|
|
|
extend_background_behind_borders = mkDefault true;
|
2024-02-13 20:41:13 +00:00
|
|
|
|
2024-10-06 22:02:51 +00:00
|
|
|
enable = {
|
|
|
|
terminal = mkDefault true;
|
|
|
|
migrations = mkDefault true;
|
|
|
|
};
|
2024-02-13 20:41:13 +00:00
|
|
|
|
2024-10-06 22:02:51 +00:00
|
|
|
styles = {
|
|
|
|
bold = mkDefault false;
|
|
|
|
# I would like to add more options for this
|
|
|
|
italic = mkDefault false;
|
|
|
|
transparency = cfg.transparent;
|
|
|
|
};
|
|
|
|
};
|
2024-02-13 20:41:13 +00:00
|
|
|
|
2024-10-06 22:02:51 +00:00
|
|
|
setup = _: ''
|
2024-02-13 20:41:13 +00:00
|
|
|
vim.cmd("colorscheme rose-pine")
|
|
|
|
'';
|
|
|
|
styles = ["main" "moon" "dawn"];
|
|
|
|
};
|
2023-02-01 19:11:37 +00:00
|
|
|
}
|