mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 05:10:44 +00:00
progress
This commit is contained in:
parent
67fb3e00a4
commit
013a6ddd9f
8 changed files with 121 additions and 0 deletions
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
Loading…
Reference in a new issue