mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-16 04:04:34 +02:00
plugins/colorschemes: migrate helpers -> lib.nixvim
This commit is contained in:
parent
b470800240
commit
fba168aba7
20 changed files with 236 additions and 220 deletions
|
@ -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()
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue