nix-community.nixvim/plugins/colorschemes/modus.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

115 lines
2.9 KiB
Nix
Raw Normal View History

2024-05-28 15:13:08 -04:00
{
lib,
...
}:
let
inherit (lib.nixvim) defaultNullOpts;
in
2024-09-01 12:52:28 +01:00
lib.nixvim.neovim-plugin.mkNeovimPlugin {
2024-05-28 15:13:08 -04:00
name = "modus";
moduleName = "modus-themes";
packPathName = "modus-themes.nvim";
package = "modus-themes-nvim";
2024-05-28 15:13:08 -04:00
isColorscheme = true;
2024-09-27 05:28:00 +01:00
maintainers = [ lib.maintainers.nwjsmith ];
2024-05-28 15:13:08 -04:00
settingsOptions = {
style =
defaultNullOpts.mkEnumFirstDefault
2024-05-28 15:13:08 -04:00
[
"modus_operandi"
"modus_vivendi"
]
''
The theme comes in a light `modus_operandi` style and a dark `modus_vivendi` style.
'';
variant =
defaultNullOpts.mkEnumFirstDefault
2024-05-28 15:13:08 -04:00
[
"default"
"tinted"
"deuteranopia"
"tritanopia"
]
''
Styles come in four variants:
- `default` is the plugin's main style designed to cover a broad range of needs.
- `tinted` tones down intensity and provides more color variety.
- `deuteranopia` is optimized for users with red-green color deficiency.
- `tritanopia` is optimized for users with blue-yellow color deficiency.
'';
transparent = defaultNullOpts.mkBool false ''
2024-05-28 15:13:08 -04:00
Disable setting the background color.
'';
hide_inactive_statusline = defaultNullOpts.mkBool false ''
Hide statuslines in inactive windows.
'';
dim_inactive = defaultNullOpts.mkBool false ''
2024-05-28 15:13:08 -04:00
Dims inactive windows.
'';
styles = {
comments = defaultNullOpts.mkHighlight { italic = true; } "" ''
2024-05-28 15:13:08 -04:00
Define comments highlight properties.
'';
keywords = defaultNullOpts.mkHighlight { italic = true; } "" ''
2024-05-28 15:13:08 -04:00
Define keywords highlight properties.
'';
functions = defaultNullOpts.mkHighlight { } "" ''
2024-05-28 15:13:08 -04:00
Define functions highlight properties.
'';
variables = defaultNullOpts.mkHighlight { } "" ''
2024-05-28 15:13:08 -04:00
Define variables highlight properties.
'';
};
on_colors = defaultNullOpts.mkLuaFn "function(colors) end" ''
2024-05-28 15:13:08 -04:00
Override specific color groups to use other groups or a hex color.
Function will be called with a `ColorScheme` table.
```
@param colors ColorScheme
```
'';
on_highlights = defaultNullOpts.mkLuaFn "function(highlights, colors) end" ''
2024-05-28 15:13:08 -04:00
Override specific highlights to use other groups or a hex color.
Function will be called with a `Highlights` and `ColorScheme` table.
```
@param highlights Highlights
@param colors ColorScheme
```
'';
};
settingsExample = {
style = "auto";
variant = "default";
transparent = false;
dim_inactive = false;
hide_inactive_statusline = false;
2024-05-28 15:13:08 -04:00
styles = {
comments.italic = true;
keywords.italic = true;
functions = { };
variables = { };
};
on_colors = "function(colors) end";
on_highlights = "function(highlights, colors) end";
};
extraConfig = {
opts.termguicolors = lib.mkDefault true;
};
2024-05-28 15:13:08 -04:00
}