-
-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8968da1
commit 1e564fa
Showing
3 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; | ||
}; | ||
}; | ||
} |