Based on 3588, all extensions need to have vscodeExtUniqueId
. But I am not sure how should i modify my code to include this into my extension.
Error:
error: attribute 'vscodeExtUniqueId' missing
at /nix/store/vwnfcqj0dfz7502smasxi6dl272y7345-source/pkgs/applications/editors/vscode/extensions/vscode-utils.nix:106:12:
105| identifier = {
106| id = ext.vscodeExtUniqueId;
| ^
107| uuid = "";
(use '--show-trace' to show detailed location information)
I am trying to use base16 colorscheme using my own custom extension. Here is what the code looks like:
theme.nix:
<rest is just colors>
"package.json" = __toJSON {
name = "theme";
displayName = "Xi's generated theme";
version = "0.0.0";
publisher = "Xi";
engines.vscode = "^1.22.0";
contributes.themes = [
{
label = "Xi's generated theme";
uiTheme = "vs-dark";
path = "./theme/generated.json";
}
];
capabilities = {
untrustedWorkspaces.supported = true;
virtualWorkspaces = true;
};
};
};
in
with builtins;
linkFarm "xi.theme" (attrValues (mapAttrs (name: value: {
name = "share/vscode/extensions/xi.theme/${name}";
path = toFile (baseNameOf name) value;
})
theme))
And then just call it like this:
programs.vscode.extensions =
with extensions.open-vsx;
with extensions.vscode-marketplace;
with pkgs.vscode-extensions; [
(pkgs.callPackage ./theme.nix {} osConfig.modules.themes.colors)