forked from nix-community/nixvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvscode.nix
40 lines (37 loc) · 1.35 KB
/
vscode.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
lib,
...
}:
let
inherit (lib.nixvim) defaultNullOpts toLuaObject;
in
lib.nixvim.neovim-plugin.mkNeovimPlugin {
name = "vscode";
isColorscheme = true;
originalName = "vscode-nvim";
package = "vscode-nvim";
colorscheme = null; # Color scheme is set by `require.("vscode").load()`
callSetup = false;
maintainers = [ lib.maintainers.loicreynier ];
settingsOptions = {
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 lib.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 = 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: {
colorschemes.vscode.luaConfig.content = ''
local _vscode = require("vscode")
_vscode.setup(${toLuaObject cfg.settings})
_vscode.load()
'';
};
}