1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-21 17:59:39 +01:00

vscode: fix version checks when using Windsurf (#7285)

This commit is contained in:
Bryton Hall 2025-06-16 22:31:03 -04:00 committed by GitHub
parent 0edffd088e
commit 28eef8722d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -438,7 +438,16 @@ in
lib.concatMap toPaths (flatten (mapAttrsToList (n: v: v.extensions) cfg.profiles))
++
lib.optional
((lib.versionAtLeast vscodeVersion "1.74.0" || vscodePname == "cursor") && defaultProfile != { })
(
(
lib.versionAtLeast vscodeVersion "1.74.0"
|| builtins.elem vscodePname [
"cursor"
"windsurf"
]
)
&& defaultProfile != { }
)
{
# Whenever our immutable extensions.json changes, force VSCode to regenerate
# extensions.json with both mutable and immutable extensions.
@ -461,7 +470,14 @@ in
paths =
(flatten (mapAttrsToList (n: v: v.extensions) cfg.profiles))
++ lib.optional (
(lib.versionAtLeast vscodeVersion "1.74.0" || vscodePname == "cursor") && defaultProfile != { }
(
lib.versionAtLeast vscodeVersion "1.74.0"
|| builtins.elem vscodePname [
"cursor"
"windsurf"
]
)
&& defaultProfile != { }
) (extensionJsonFile "default" (extensionJson defaultProfile.extensions));
};
in