feat: instealled graphql plugin for leyla vscode
This commit is contained in:
parent
1b5c62f2e6
commit
64e29f793f
3 changed files with 31 additions and 0 deletions
|
|
@ -58,6 +58,9 @@ in {
|
||||||
|
|
||||||
nearley.enable = true;
|
nearley.enable = true;
|
||||||
|
|
||||||
|
# graphql
|
||||||
|
graphql.enable = true;
|
||||||
|
|
||||||
# astro development
|
# astro development
|
||||||
vscodeMdx.enable = true;
|
vscodeMdx.enable = true;
|
||||||
astroVscode.enable = true;
|
astroVscode.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -26,5 +26,6 @@
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
./conventionalCommits.nix
|
./conventionalCommits.nix
|
||||||
./openDyslexicFont.nix
|
./openDyslexicFont.nix
|
||||||
|
./graphql.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
27
modules/home-manager-modules/programs/vscode/graphql.nix
Normal file
27
modules/home-manager-modules/programs/vscode/graphql.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
||||||
|
pkgsRepository = pkgsRepositories.open-vsx;
|
||||||
|
in {
|
||||||
|
options.programs.vscode.profiles = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
||||||
|
options = {
|
||||||
|
extraExtensions.graphql = {
|
||||||
|
enable = lib.mkEnableOption "should the graphql highlighting extension for vscode be enabled";
|
||||||
|
extension = lib.mkPackageOption pkgsRepository "vscode-graphql" {
|
||||||
|
default = ["graphql" "vscode-graphql-syntax"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.extraExtensions.graphql.enable {
|
||||||
|
extensions = [
|
||||||
|
config.extraExtensions.graphql.extension
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue