Skip to content

Commit cfab393

Browse files
authored
Merge pull request #9483 from nicdumz/do-not-overwrite-settings
fix: merge yaml.schemas settings
2 parents e419333 + a0729bd commit cfab393

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extensions/vscode/src/activation/activate.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export async function activateExtension(context: vscode.ExtensionContext) {
5959
// Register config.yaml schema by removing old entries and adding new one (uri.fsPath changes with each version)
6060
const yamlMatcher = ".continue/**/*.yaml";
6161
const yamlConfig = vscode.workspace.getConfiguration("yaml");
62+
const yamlSchemas = yamlConfig.get<object>("schemas", {});
6263

6364
const newPath = vscode.Uri.joinPath(
6465
context.extension.extensionUri,
@@ -68,7 +69,10 @@ export async function activateExtension(context: vscode.ExtensionContext) {
6869
try {
6970
await yamlConfig.update(
7071
"schemas",
71-
{ [newPath]: [yamlMatcher] },
72+
{
73+
...yamlSchemas,
74+
[newPath]: [yamlMatcher],
75+
},
7276
vscode.ConfigurationTarget.Global,
7377
);
7478
} catch (error) {

0 commit comments

Comments
 (0)