mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
colorschemes/monokai-pro: init
This commit is contained in:
parent
8968da1617
commit
1e564fae7d
3 changed files with 195 additions and 0 deletions
129
plugins/colorschemes/monokai-pro.nix
Normal file
129
plugins/colorschemes/monokai-pro.nix
Normal file
|
@ -0,0 +1,129 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) types;
|
||||
inherit (lib.nixvim) defaultNullOpts literalLua;
|
||||
in
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "monokai-pro";
|
||||
isColorscheme = true;
|
||||
packPathName = "monokai-pro.nvim";
|
||||
package = "monokai-pro-nvim";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
settingsOptions = {
|
||||
transparent_background = defaultNullOpts.mkBool false ''
|
||||
Whether to enable transparent background.
|
||||
'';
|
||||
|
||||
terminal_colors = defaultNullOpts.mkBool true ''
|
||||
Whether to use terminal colors.
|
||||
'';
|
||||
|
||||
devicons = defaultNullOpts.mkBool false ''
|
||||
Whether to use devicons characters.
|
||||
'';
|
||||
|
||||
styles =
|
||||
defaultNullOpts.mkAttrsOf (with types; attrsOf anything)
|
||||
{
|
||||
comment.italic = true;
|
||||
keyword.italic = true;
|
||||
type.italic = true;
|
||||
storageclass.italic = true;
|
||||
structure.italic = true;
|
||||
parameter.italic = true;
|
||||
annotation.italic = true;
|
||||
tag_attribute.italic = true;
|
||||
}
|
||||
''
|
||||
Set the style for specific elements.
|
||||
'';
|
||||
|
||||
filter = defaultNullOpts.mkStr' {
|
||||
pluginDefault = literalLua "vim.o.background == 'light' and 'classic' or 'pro'";
|
||||
example = "ristretto";
|
||||
description = ''
|
||||
Which filter to use.
|
||||
'';
|
||||
};
|
||||
|
||||
day_night = {
|
||||
enable = defaultNullOpts.mkBool false ''
|
||||
Whether to enable day/night mode.
|
||||
'';
|
||||
|
||||
day_filter = defaultNullOpts.mkStr' {
|
||||
pluginDefault = "pro";
|
||||
example = "classic";
|
||||
description = ''
|
||||
Which day filter to use.
|
||||
'';
|
||||
};
|
||||
|
||||
night_filter = defaultNullOpts.mkStr' {
|
||||
pluginDefault = "spectrum";
|
||||
example = "octagon";
|
||||
description = ''
|
||||
Which night filter to use.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
inc_search = defaultNullOpts.mkEnum [ "underline" "background" ] "background" ''
|
||||
Incremental search look.
|
||||
'';
|
||||
|
||||
background_clear =
|
||||
defaultNullOpts.mkListOf types.str
|
||||
[
|
||||
"toggleterm"
|
||||
"telescope"
|
||||
"renamer"
|
||||
"notify"
|
||||
]
|
||||
''
|
||||
List of plugins for which the background should be clear.
|
||||
'';
|
||||
|
||||
plugins =
|
||||
defaultNullOpts.mkAttrsOf (with types; attrsOf anything)
|
||||
{
|
||||
bufferline = {
|
||||
underline_selected = false;
|
||||
underline_visible = false;
|
||||
underline_fill = false;
|
||||
bold = true;
|
||||
};
|
||||
indent_blankline = {
|
||||
context_highlight = "default";
|
||||
context_start_underline = false;
|
||||
};
|
||||
}
|
||||
''
|
||||
Override configuration for specific plugins.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
terminal_colors = false;
|
||||
devicons = true;
|
||||
filter = "ristretto";
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
warnings =
|
||||
lib.optional
|
||||
(
|
||||
(lib.isBool cfg.settings.devicons) && cfg.settings.devicons && (!config.plugins.web-devicons.enable)
|
||||
)
|
||||
''
|
||||
Nixvim (colorschemes.monokai-pro): You have enabled `settings.devicons` but `plugins.web-devicons.enable` is `false`.
|
||||
Consider enabling the plugin for proper devicons support.
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -13,6 +13,7 @@
|
|||
./colorschemes/kanagawa.nix
|
||||
./colorschemes/melange.nix
|
||||
./colorschemes/modus.nix
|
||||
./colorschemes/monokai-pro.nix
|
||||
./colorschemes/nightfox.nix
|
||||
./colorschemes/nord.nix
|
||||
./colorschemes/one.nix
|
||||
|
|
65
tests/test-sources/plugins/colorschemes/monokai-pro.nix
Normal file
65
tests/test-sources/plugins/colorschemes/monokai-pro.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
empty = {
|
||||
colorschemes.monokai-pro.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.web-devicons.enable = true;
|
||||
colorschemes.monokai-pro = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
transparent_background = false;
|
||||
terminal_colors = true;
|
||||
devicons = false;
|
||||
styles = {
|
||||
comment.italic = true;
|
||||
keyword.italic = true;
|
||||
type.italic = true;
|
||||
storageclass.italic = true;
|
||||
structure.italic = true;
|
||||
parameter.italic = true;
|
||||
annotation.italic = true;
|
||||
tag_attribute.italic = true;
|
||||
};
|
||||
filter.__raw = "vim.o.background == 'light' and 'classic' or 'pro'";
|
||||
day_night = {
|
||||
enable = false;
|
||||
day_filter = "pro";
|
||||
night_filter = "spectrum";
|
||||
};
|
||||
inc_search = "background";
|
||||
background_clear = [
|
||||
"toggleterm"
|
||||
"telescope"
|
||||
"renamer"
|
||||
"notify"
|
||||
];
|
||||
plugins = {
|
||||
bufferline = {
|
||||
underline_selected = false;
|
||||
underline_visible = false;
|
||||
underline_fill = false;
|
||||
bold = true;
|
||||
};
|
||||
indent_blankline = {
|
||||
context_highlight = "default";
|
||||
context_start_underline = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
colorschemes.monokai-pro = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
terminal_colors = false;
|
||||
devicons = false;
|
||||
filter = "ristretto";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue