mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
Compare commits
13 commits
12b650fea7
...
013a6ddd9f
Author | SHA1 | Date | |
---|---|---|---|
|
013a6ddd9f | ||
|
67fb3e00a4 | ||
|
e9f9353c45 | ||
|
7c01a7c875 | ||
|
8f10028449 | ||
|
2c3350eb15 | ||
|
0fa8fbdf6f | ||
|
c177916790 | ||
|
59b8335a26 | ||
|
b66ee19ff3 | ||
|
ba1c3645ee | ||
|
b2ba2c0ab5 | ||
|
b41163959b |
11 changed files with 315 additions and 139 deletions
|
@ -5,7 +5,7 @@ in {
|
||||||
vim.theme = {
|
vim.theme = {
|
||||||
enable = mkDefault false;
|
enable = mkDefault false;
|
||||||
name = mkDefault "onedark";
|
name = mkDefault "onedark";
|
||||||
style = mkDefault "darker";
|
# style = mkDefault "darker";
|
||||||
transparent = mkDefault false;
|
transparent = mkDefault false;
|
||||||
extraConfig = mkDefault "";
|
extraConfig = mkDefault "";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,105 +2,139 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.strings) optionalString;
|
inherit (lib.strings) hasPrefix optionalString;
|
||||||
inherit (lib.trivial) boolToString warnIf;
|
inherit (lib.attrsets) genAttrs listToAttrs mergeAttrsList;
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
|
inherit (lib.types) bool str;
|
||||||
|
inherit (lib.nvim.types) hexColor mkPluginSetupOption;
|
||||||
|
cfg = config.vim.theme;
|
||||||
|
|
||||||
|
mkEnableOption' = name: mkEnableOption name // {default = true;};
|
||||||
|
numbers = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F"];
|
||||||
|
base16Options = listToAttrs (map (n: {
|
||||||
|
name = "base0${n}";
|
||||||
|
value = mkOption {
|
||||||
|
description = "The base0${n} color to use";
|
||||||
|
type = hexColor;
|
||||||
|
apply = v:
|
||||||
|
if hasPrefix "#" v
|
||||||
|
then v
|
||||||
|
else "#${v}";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
numbers);
|
||||||
in {
|
in {
|
||||||
base16 = {
|
base16 = {
|
||||||
setup = {base16-colors, ...}: ''
|
setupOpts = mkPluginSetupOption "base16" base16Options;
|
||||||
-- Base16 theme
|
setup = "";
|
||||||
require('base16-colorscheme').setup(${toLuaObject base16-colors})
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onedark = {
|
onedark = {
|
||||||
setup = {style ? "dark", ...}: ''
|
setupOpts = mkPluginSetupOption "onedark" {
|
||||||
|
style = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = cfg.style;
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
setup = ''
|
||||||
-- OneDark theme
|
-- OneDark theme
|
||||||
require('onedark').setup {
|
|
||||||
style = "${style}"
|
|
||||||
}
|
|
||||||
require('onedark').load()
|
require('onedark').load()
|
||||||
'';
|
'';
|
||||||
styles = ["dark" "darker" "cool" "deep" "warm" "warmer"];
|
styles = ["dark" "darker" "cool" "deep" "warm" "warmer"];
|
||||||
};
|
};
|
||||||
|
|
||||||
tokyonight = {
|
tokyonight = {
|
||||||
setup = {
|
setupOpts = mkPluginSetupOption "tokyonight" {
|
||||||
style ? "night",
|
transparent = mkOption {
|
||||||
transparent,
|
type = bool;
|
||||||
...
|
default = cfg.transparent;
|
||||||
}: ''
|
internal = true;
|
||||||
require('tokyonight').setup {
|
};
|
||||||
transparent = ${boolToString transparent};
|
};
|
||||||
}
|
setup = ''
|
||||||
vim.cmd[[colorscheme tokyonight-${style}]]
|
vim.cmd[[colorscheme tokyonight-${cfg.style}]]
|
||||||
'';
|
'';
|
||||||
styles = ["day" "night" "storm" "moon"];
|
styles = ["night" "day" "storm" "moon"];
|
||||||
};
|
};
|
||||||
|
|
||||||
dracula = {
|
dracula = {
|
||||||
setup = {transparent, ...}: ''
|
setupOpts = mkPluginSetupOption "dracula" {
|
||||||
require('dracula').setup({
|
transparent_bg = mkOption {
|
||||||
transparent_bg = ${boolToString transparent},
|
type = bool;
|
||||||
});
|
default = cfg.transparent;
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
setup = ''
|
||||||
require('dracula').load();
|
require('dracula').load();
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
catppuccin = {
|
catppuccin = {
|
||||||
setup = {
|
setupOpts = mkPluginSetupOption "catppuccin" {
|
||||||
style ? "mocha",
|
flavour = mkOption {
|
||||||
transparent ? false,
|
type = str;
|
||||||
...
|
default = cfg.style;
|
||||||
}: ''
|
# internal = true;
|
||||||
-- Catppuccin theme
|
};
|
||||||
require('catppuccin').setup {
|
transparent_background = mkOption {
|
||||||
flavour = "${style}",
|
type = bool;
|
||||||
transparent_background = ${boolToString transparent},
|
default = cfg.transparent;
|
||||||
term_colors = true,
|
internal = true;
|
||||||
integrations = {
|
};
|
||||||
nvimtree = {
|
term_colors = mkEnableOption' "term_colors";
|
||||||
enabled = true,
|
integrations =
|
||||||
transparent_panel = ${boolToString transparent},
|
{
|
||||||
show_root = true,
|
nvimtree = {
|
||||||
},
|
enabled = mkEnableOption' "enabled";
|
||||||
|
transparent_panel = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = cfg.transparent;
|
||||||
|
};
|
||||||
|
show_root = mkEnableOption' "show_root";
|
||||||
|
};
|
||||||
|
|
||||||
hop = true,
|
|
||||||
gitsigns = true,
|
|
||||||
telescope = true,
|
|
||||||
treesitter = true,
|
|
||||||
treesitter_context = true,
|
|
||||||
ts_rainbow = true,
|
|
||||||
fidget = true,
|
|
||||||
alpha = true,
|
|
||||||
leap = true,
|
|
||||||
markdown = true,
|
|
||||||
noice = true,
|
|
||||||
notify = true, -- nvim-notify
|
|
||||||
which_key = true,
|
|
||||||
navic = {
|
navic = {
|
||||||
enabled = true,
|
enabled = mkEnableOption' "enabled";
|
||||||
custom_bg = "NONE", -- "lualine" will set background to mantle
|
# lualine will set backgound to mantle
|
||||||
},
|
custom_bg = mkOption {
|
||||||
},
|
type = str;
|
||||||
}
|
default = "NONE";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// genAttrs [
|
||||||
|
"hop"
|
||||||
|
"gitsigns"
|
||||||
|
"telescope"
|
||||||
|
"treesitter"
|
||||||
|
"treesitter_context"
|
||||||
|
"ts_rainbow"
|
||||||
|
"fidget"
|
||||||
|
"alpha"
|
||||||
|
"leap"
|
||||||
|
"markdown"
|
||||||
|
"noice"
|
||||||
|
"notify"
|
||||||
|
"which_key"
|
||||||
|
] (name: mkEnableOption' name);
|
||||||
|
};
|
||||||
|
setup = ''
|
||||||
|
-- Catppuccin theme
|
||||||
-- setup must be called before loading
|
-- setup must be called before loading
|
||||||
vim.cmd.colorscheme "catppuccin"
|
vim.cmd.colorscheme "catppuccin"
|
||||||
'';
|
'';
|
||||||
styles = ["latte" "frappe" "macchiato" "mocha"];
|
styles = ["mocha" "latte" "frappe" "macchiato"];
|
||||||
};
|
};
|
||||||
|
|
||||||
oxocarbon = {
|
oxocarbon = {
|
||||||
setup = {
|
setupOpts = {};
|
||||||
style ? "dark",
|
setup = ''
|
||||||
transparent ? false,
|
|
||||||
}: let
|
|
||||||
style' =
|
|
||||||
warnIf (style == "light") "oxocarbon: light theme is not well-supported" style;
|
|
||||||
in ''
|
|
||||||
require('oxocarbon')
|
require('oxocarbon')
|
||||||
vim.opt.background = "${style'}"
|
vim.opt.background = "${cfg.style}"
|
||||||
vim.cmd.colorscheme = "oxocarbon"
|
vim.cmd.colorscheme = "oxocarbon"
|
||||||
${optionalString transparent ''
|
${optionalString cfg.transparent ''
|
||||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { 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, "LineNr", { bg = "none" })
|
||||||
|
@ -114,62 +148,84 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
gruvbox = {
|
gruvbox = {
|
||||||
setup = {
|
setupOpts =
|
||||||
style ? "dark",
|
mkPluginSetupOption "gruvbox" {
|
||||||
transparent ? false,
|
transparent_mode = mkOption {
|
||||||
}: ''
|
type = bool;
|
||||||
|
default = cfg.transparent;
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
italic =
|
||||||
|
{
|
||||||
|
operators = mkEnableOption "operators";
|
||||||
|
}
|
||||||
|
// genAttrs [
|
||||||
|
"strings"
|
||||||
|
"emphasis"
|
||||||
|
"comments"
|
||||||
|
"folds"
|
||||||
|
] (name: mkEnableOption' name);
|
||||||
|
|
||||||
|
contrast = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
# TODO: fix these
|
||||||
|
# palette_overrides = mkLuaInline "{}";
|
||||||
|
# overrides = mkLuaInline "{}";
|
||||||
|
}
|
||||||
|
// mergeAttrsList [
|
||||||
|
(genAttrs [
|
||||||
|
"terminal_colors"
|
||||||
|
"undercurls"
|
||||||
|
"underline"
|
||||||
|
"bold"
|
||||||
|
"strikethrough"
|
||||||
|
"inverse"
|
||||||
|
] (name: mkEnableOption' name))
|
||||||
|
(genAttrs [
|
||||||
|
"invert_selection"
|
||||||
|
"invert_signs"
|
||||||
|
"invert_tabline"
|
||||||
|
"invert_intend_guides"
|
||||||
|
"dim_inactive"
|
||||||
|
] (name: mkEnableOption name))
|
||||||
|
];
|
||||||
|
setup = ''
|
||||||
-- Gruvbox theme
|
-- Gruvbox theme
|
||||||
require("gruvbox").setup({
|
vim.o.background = "${cfg.style}"
|
||||||
terminal_colors = true, -- add neovim terminal colors
|
|
||||||
undercurl = true,
|
|
||||||
underline = true,
|
|
||||||
bold = true,
|
|
||||||
italic = {
|
|
||||||
strings = true,
|
|
||||||
emphasis = true,
|
|
||||||
comments = true,
|
|
||||||
operators = false,
|
|
||||||
folds = true,
|
|
||||||
},
|
|
||||||
strikethrough = true,
|
|
||||||
invert_selection = false,
|
|
||||||
invert_signs = false,
|
|
||||||
invert_tabline = false,
|
|
||||||
invert_intend_guides = false,
|
|
||||||
inverse = true,
|
|
||||||
contrast = "",
|
|
||||||
palette_overrides = {},
|
|
||||||
overrides = {},
|
|
||||||
dim_inactive = false,
|
|
||||||
transparent_mode = ${boolToString transparent},
|
|
||||||
})
|
|
||||||
vim.o.background = "${style}"
|
|
||||||
vim.cmd("colorscheme gruvbox")
|
vim.cmd("colorscheme gruvbox")
|
||||||
'';
|
'';
|
||||||
styles = ["dark" "light"];
|
styles = ["dark" "light"];
|
||||||
};
|
};
|
||||||
rose-pine = {
|
rose-pine = {
|
||||||
setup = {
|
setupOpts = mkPluginSetupOption "rose-pine" {
|
||||||
style ? "main",
|
dark_variant = mkOption {
|
||||||
transparent ? false,
|
type = str;
|
||||||
}: ''
|
default = cfg.style;
|
||||||
require("rose-pine").setup({
|
internal = true;
|
||||||
dark_variant = "${style}", -- main, moon, or dawn
|
};
|
||||||
dim_inactive_windows = false,
|
dim_inactive_windows = mkEnableOption "dim_inactive_windows";
|
||||||
extend_background_behind_borders = true,
|
extend_background_behind_borders = mkEnableOption' "extend_background_behind_borders";
|
||||||
|
|
||||||
enable = {
|
enable = {
|
||||||
terminal = true,
|
terminal = mkEnableOption' "terminal";
|
||||||
migrations = true,
|
migrations = mkEnableOption' "migrations";
|
||||||
},
|
};
|
||||||
|
|
||||||
styles = {
|
styles = {
|
||||||
bold = false,
|
bold = mkEnableOption "bold";
|
||||||
italic = false, -- I would like to add more options for this
|
# I would like to add more options for this
|
||||||
transparency = ${boolToString transparent},
|
italic = mkEnableOption "italic";
|
||||||
},
|
transparency = mkOption {
|
||||||
})
|
type = bool;
|
||||||
|
default = cfg.transparent;
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
setup = ''
|
||||||
vim.cmd("colorscheme rose-pine")
|
vim.cmd("colorscheme rose-pine")
|
||||||
'';
|
'';
|
||||||
styles = ["main" "moon" "dawn"];
|
styles = ["main" "moon" "dawn"];
|
||||||
|
|
43
modules/plugins/theme/supported-themes/base16.nix
Normal file
43
modules/plugins/theme/supported-themes/base16.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.vim.theme;
|
||||||
|
inherit (lib.strings) hasPrefix;
|
||||||
|
inherit (lib.attrsets) listToAttrs;
|
||||||
|
inherit (lib.options) mkOption;
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.types) hexColor mkPluginSetupOption;
|
||||||
|
inherit (lib.nvim.dag) entryBefore;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
|
numbers = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F"];
|
||||||
|
base16Options = listToAttrs (map (n: {
|
||||||
|
name = "base0${n}";
|
||||||
|
value = mkOption {
|
||||||
|
description = "The base0${n} color to use";
|
||||||
|
type = hexColor;
|
||||||
|
apply = v:
|
||||||
|
if hasPrefix "#" v
|
||||||
|
then v
|
||||||
|
else "#${v}";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
numbers);
|
||||||
|
in {
|
||||||
|
base16 = {
|
||||||
|
setupOpts = mkPluginSetupOption "base16" base16Options;
|
||||||
|
setup = "";
|
||||||
|
};
|
||||||
|
config =
|
||||||
|
mkIf cfg.name
|
||||||
|
== "base16" {
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["base16"];
|
||||||
|
luaConfigRC.theme = entryBefore ["pluginConfigs"] ''
|
||||||
|
require('base16-colorscheme').setup(${toLuaObject cfg.setupOpts})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
78
modules/plugins/theme/supported-themes/catppuccin.nix
Normal file
78
modules/plugins/theme/supported-themes/catppuccin.nix
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.vim.theme;
|
||||||
|
inherit (lib.strings) hasPrefix optionalString;
|
||||||
|
inherit (lib.attrsets) genAttrs listToAttrs mergeAttrsList;
|
||||||
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
|
inherit (lib.types) bool str;
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.types) hexColor mkPluginSetupOption;
|
||||||
|
inherit (lib.nvim.dag) entryBefore;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
mkEnableOption' = name: mkEnableOption name // {default = true;};
|
||||||
|
in {
|
||||||
|
catppuccin = {
|
||||||
|
setupOpts = mkPluginSetupOption "catppuccin" {
|
||||||
|
flavour = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = cfg.style;
|
||||||
|
# internal = true;
|
||||||
|
};
|
||||||
|
transparent_background = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = cfg.transparent;
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
term_colors = mkEnableOption' "term_colors";
|
||||||
|
integrations =
|
||||||
|
{
|
||||||
|
nvimtree = {
|
||||||
|
enabled = mkEnableOption' "enabled";
|
||||||
|
transparent_panel = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = cfg.transparent;
|
||||||
|
};
|
||||||
|
show_root = mkEnableOption' "show_root";
|
||||||
|
};
|
||||||
|
|
||||||
|
navic = {
|
||||||
|
enabled = mkEnableOption' "enabled";
|
||||||
|
# lualine will set backgound to mantle
|
||||||
|
custom_bg = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = "NONE";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// genAttrs [
|
||||||
|
"hop"
|
||||||
|
"gitsigns"
|
||||||
|
"telescope"
|
||||||
|
"treesitter"
|
||||||
|
"treesitter_context"
|
||||||
|
"ts_rainbow"
|
||||||
|
"fidget"
|
||||||
|
"alpha"
|
||||||
|
"leap"
|
||||||
|
"markdown"
|
||||||
|
"noice"
|
||||||
|
"notify"
|
||||||
|
"which_key"
|
||||||
|
] (name: mkEnableOption' name);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config =
|
||||||
|
mkIf cfg.name
|
||||||
|
== "catppuccin" {
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["catppuccin"];
|
||||||
|
luaConfigRC.theme = entryBefore ["pluginConfigs"] ''
|
||||||
|
then "require('catppuccin').setup(${toLuaObject cfg.setupOpts})"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
0
modules/plugins/theme/supported-themes/default.nix
Normal file
0
modules/plugins/theme/supported-themes/default.nix
Normal file
0
modules/plugins/theme/supported-themes/dracula.nix
Normal file
0
modules/plugins/theme/supported-themes/dracula.nix
Normal file
0
modules/plugins/theme/supported-themes/gruvbox.nix
Normal file
0
modules/plugins/theme/supported-themes/gruvbox.nix
Normal file
0
modules/plugins/theme/supported-themes/onedark.nix
Normal file
0
modules/plugins/theme/supported-themes/onedark.nix
Normal file
0
modules/plugins/theme/supported-themes/oxocarbon.nix
Normal file
0
modules/plugins/theme/supported-themes/oxocarbon.nix
Normal file
0
modules/plugins/theme/supported-themes/rose-pine.nix
Normal file
0
modules/plugins/theme/supported-themes/rose-pine.nix
Normal file
|
@ -4,33 +4,21 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.options) mkOption;
|
inherit (lib.options) mkOption;
|
||||||
inherit (lib.attrsets) attrNames listToAttrs;
|
inherit (lib.attrsets) attrNames;
|
||||||
inherit (lib.strings) hasPrefix;
|
inherit (lib.strings) elemAt;
|
||||||
inherit (lib.types) bool lines enum;
|
inherit (lib.types) bool lines enum;
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.nvim.dag) entryBefore;
|
inherit (lib.nvim.dag) entryBefore;
|
||||||
inherit (lib.nvim.types) hexColor;
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
cfg = config.vim.theme;
|
cfg = config.vim.theme;
|
||||||
supportedThemes = import ./supported-themes.nix {
|
supportedThemes = import ./supported-themes.nix {
|
||||||
inherit lib config;
|
inherit lib config;
|
||||||
};
|
};
|
||||||
|
|
||||||
numbers = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F"];
|
|
||||||
base16Options = listToAttrs (map (n: {
|
|
||||||
name = "base0${n}";
|
|
||||||
value = mkOption {
|
|
||||||
description = "The base0${n} color to use";
|
|
||||||
type = hexColor;
|
|
||||||
apply = v:
|
|
||||||
if hasPrefix "#" v
|
|
||||||
then v
|
|
||||||
else "#${v}";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
numbers);
|
|
||||||
in {
|
in {
|
||||||
options.vim.theme = {
|
options.vim.theme = {
|
||||||
|
inherit (supportedThemes.${cfg.name}) setupOpts;
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
description = "Enable theming";
|
description = "Enable theming";
|
||||||
|
@ -43,10 +31,9 @@ in {
|
||||||
requires all of the colors in {option}`vim.theme.base16-colors` to be set.
|
requires all of the colors in {option}`vim.theme.base16-colors` to be set.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
base16-colors = base16Options;
|
|
||||||
|
|
||||||
style = mkOption {
|
style = mkOption {
|
||||||
type = enum supportedThemes.${cfg.name}.styles;
|
type = enum supportedThemes.${cfg.name}.styles;
|
||||||
|
default = elemAt supportedThemes.${cfg.name}.styles 0;
|
||||||
description = "Specific style for theme if it supports it";
|
description = "Specific style for theme if it supports it";
|
||||||
};
|
};
|
||||||
transparent = mkOption {
|
transparent = mkOption {
|
||||||
|
@ -62,11 +49,23 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = let
|
||||||
|
name' =
|
||||||
|
if cfg.name == "base16"
|
||||||
|
then "base16-colorscheme"
|
||||||
|
else cfg.name;
|
||||||
|
in {
|
||||||
startPlugins = [cfg.name];
|
startPlugins = [cfg.name];
|
||||||
luaConfigRC.theme = entryBefore ["pluginConfigs"] ''
|
luaConfigRC.theme = entryBefore ["pluginConfigs"] ''
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
${supportedThemes.${cfg.name}.setup {inherit (cfg) style transparent base16-colors;}}
|
|
||||||
|
${
|
||||||
|
if name' != "oxocarbon"
|
||||||
|
then "require('${name'}').setup(${toLuaObject cfg.setupOpts})"
|
||||||
|
else ""
|
||||||
|
}
|
||||||
|
|
||||||
|
${supportedThemes.${cfg.name}.setup}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue