plugins/colorschemes: migrate helpers -> lib.nixvim

This commit is contained in:
Austin Horstman 2024-08-22 09:24:17 -05:00
parent b470800240
commit fba168aba7
No known key found for this signature in database
20 changed files with 236 additions and 220 deletions

View file

@ -1,12 +1,14 @@
{
lib,
helpers,
config,
pkgs,
...
}:
with lib;
helpers.neovim-plugin.mkNeovimPlugin config {
let
inherit (lib.nixvim) defaultNullOpts toLuaObject;
in
lib.nixvim.neovim-plugin.mkNeovimPlugin config {
name = "vscode";
isColorscheme = true;
originalName = "vscode-nvim";
@ -17,26 +19,24 @@ helpers.neovim-plugin.mkNeovimPlugin config {
maintainers = [ maintainers.loicreynier ];
settingsOptions = {
transparent = helpers.defaultNullOpts.mkBool false "Whether to enable transparent background";
italic_comments = helpers.defaultNullOpts.mkBool false "Whether to enable italic comments";
underline_links = helpers.defaultNullOpts.mkBool false "Whether to underline links";
disable_nvimtree_bg = helpers.defaultNullOpts.mkBool true "Whether to disable nvim-tree background";
color_overrides = helpers.defaultNullOpts.mkAttrsOf types.str { } ''
transparent = defaultNullOpts.mkBool false "Whether to enable transparent background";
italic_comments = defaultNullOpts.mkBool false "Whether to enable italic comments";
underline_links = defaultNullOpts.mkBool false "Whether to underline links";
disable_nvimtree_bg = defaultNullOpts.mkBool true "Whether to disable nvim-tree background";
color_overrides = defaultNullOpts.mkAttrsOf types.str { } ''
A dictionary of color overrides.
See https://github.com/Mofiqul/vscode.nvim/blob/main/lua/vscode/colors.lua for color names.
'';
group_overrides =
with helpers;
defaultNullOpts.mkAttrsOf nixvimTypes.highlight { } ''
A dictionary of group names, each associated with a dictionary of parameters
(`bg`, `fg`, `sp` and `style`) and colors in hex.
'';
group_overrides = defaultNullOpts.mkAttrsOf types.highlight { } ''
A dictionary of group names, each associated with a dictionary of parameters
(`bg`, `fg`, `sp` and `style`) and colors in hex.
'';
};
extraConfig = cfg: {
extraConfigLuaPre = ''
local _vscode = require("vscode")
_vscode.setup(${helpers.toLuaObject cfg.settings})
_vscode.setup(${toLuaObject cfg.settings})
_vscode.load()
'';
};