1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-09 03:56:05 +01:00

colorschmes/vscode: drop settingsOptions, add settingsExample

This commit is contained in:
Loïc Reynier 2025-10-29 09:28:47 +01:00 committed by Gaétan Lepage
parent 3dd024dc2c
commit 89ae127134
2 changed files with 31 additions and 17 deletions

View file

@ -2,9 +2,6 @@
lib, lib,
... ...
}: }:
let
inherit (lib.nixvim) defaultNullOpts toLuaObject;
in
lib.nixvim.plugins.mkNeovimPlugin { lib.nixvim.plugins.mkNeovimPlugin {
name = "vscode"; name = "vscode";
isColorscheme = true; isColorscheme = true;
@ -14,25 +11,21 @@ lib.nixvim.plugins.mkNeovimPlugin {
maintainers = [ lib.maintainers.loicreynier ]; maintainers = [ lib.maintainers.loicreynier ];
settingsOptions = { settingsExample = {
transparent = defaultNullOpts.mkBool false "Whether to enable transparent background"; transparent = true;
italic_comments = defaultNullOpts.mkBool false "Whether to enable italic comments"; italic_comments = true;
underline_links = defaultNullOpts.mkBool false "Whether to underline links"; italic_inlayhints = true;
disable_nvimtree_bg = defaultNullOpts.mkBool true "Whether to disable nvim-tree background"; underline_links = true;
color_overrides = defaultNullOpts.mkAttrsOf lib.types.str { } '' terminal_colors = true;
A dictionary of color overrides. color_overrides = {
See https://github.com/Mofiqul/vscode.nvim/blob/main/lua/vscode/colors.lua for color names. vscLineNumber = "#FFFFFF";
''; };
group_overrides = defaultNullOpts.mkAttrsOf lib.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: { extraConfig = cfg: {
colorschemes.vscode.luaConfig.content = '' colorschemes.vscode.luaConfig.content = ''
local _vscode = require("vscode") local _vscode = require("vscode")
_vscode.setup(${toLuaObject cfg.settings}) _vscode.setup(${lib.nixvim.toLuaObject cfg.settings})
_vscode.load() _vscode.load()
''; '';
}; };

View file

@ -4,12 +4,33 @@
}; };
defaults = { defaults = {
colorschemes.vscode = {
enable = true;
settings = {
transparent = false;
italic_comments = false;
italic_inlayhints = false;
underline_links = false;
color_overrides = false;
group_overrides = { };
disable_nvimtree_bg = true;
terminal_colors = true;
};
};
};
example = {
colorschemes.vscode = { colorschemes.vscode = {
enable = true; enable = true;
settings = { settings = {
transparent = true; transparent = true;
italic_comments = true; italic_comments = true;
italic_inhayhints = true;
underline_links = true; underline_links = true;
terminal_colors = true;
color_overrides = {
vscLineNumber = "#FFFFFF";
};
}; };
}; };
}; };