mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
colorschmes/vscode: drop settingsOptions, add settingsExample
This commit is contained in:
parent
3dd024dc2c
commit
89ae127134
2 changed files with 31 additions and 17 deletions
|
|
@ -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()
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue