mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/vscode: init (#1263)
This commit is contained in:
parent
9b9912077e
commit
bb10fface4
3 changed files with 64 additions and 0 deletions
47
plugins/colorschemes/vscode.nix
Normal file
47
plugins/colorschemes/vscode.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
helpers,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
name = "vscode";
|
||||||
|
isColorscheme = true;
|
||||||
|
originalName = "vscode-nvim";
|
||||||
|
defaultPackage = pkgs.vimPlugins.vscode-nvim;
|
||||||
|
colorscheme = null; # Color scheme is set by `require.("vscode").load()`
|
||||||
|
callSetup = false;
|
||||||
|
|
||||||
|
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
|
||||||
|
"{}"
|
||||||
|
''
|
||||||
|
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.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = cfg: {
|
||||||
|
extraConfigLuaPre = ''
|
||||||
|
local _vscode = require("vscode")
|
||||||
|
_vscode.setup(${helpers.toLuaObject cfg.settings})
|
||||||
|
_vscode.load()
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -20,6 +20,7 @@
|
||||||
./colorschemes/poimandres.nix
|
./colorschemes/poimandres.nix
|
||||||
./colorschemes/rose-pine.nix
|
./colorschemes/rose-pine.nix
|
||||||
./colorschemes/tokyonight.nix
|
./colorschemes/tokyonight.nix
|
||||||
|
./colorschemes/vscode.nix
|
||||||
|
|
||||||
./completion/codeium-vim.nix
|
./completion/codeium-vim.nix
|
||||||
./completion/copilot-lua.nix
|
./completion/copilot-lua.nix
|
||||||
|
|
16
tests/test-sources/plugins/colorschemes/vscode.nix
Normal file
16
tests/test-sources/plugins/colorschemes/vscode.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
colorschemes.vscode.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
colorschemes.vscode = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
transparent = true;
|
||||||
|
italic_comments = true;
|
||||||
|
underline_links = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue