Skip to content

Commit d6d1c58

Browse files
committed
Merge branch 'main' into copilot/fix-go-to-def-behavior
2 parents bfc17fe + 545944b commit d6d1c58

File tree

2,827 files changed

+6233
-3059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,827 files changed

+6233
-3059
lines changed

Herebyfile.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export const generate = task({
270270
description: "Runs go generate on the project.",
271271
run: async () => {
272272
assertTypeScriptCloned();
273-
await $`go generate ./...`;
273+
await $`go generate -v ./...`;
274274
},
275275
});
276276

internal/fourslash/_scripts/convertFourslash.mts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,7 @@ function stringToTristate(s: string): string {
13991399
}
14001400

14011401
function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefined {
1402+
const inlayHintPreferences: string[] = [];
14021403
const preferences: string[] = [];
14031404
for (const prop of arg.properties) {
14041405
if (ts.isPropertyAssignment(prop)) {
@@ -1441,28 +1442,28 @@ function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefin
14411442
paramHint = "lsutil.IncludeInlayParameterNameHintsAll";
14421443
break;
14431444
}
1444-
preferences.push(`IncludeInlayParameterNameHints: ${paramHint}`);
1445+
inlayHintPreferences.push(`IncludeInlayParameterNameHints: ${paramHint}`);
14451446
break;
14461447
case "includeInlayParameterNameHintsWhenArgumentMatchesName":
1447-
preferences.push(`IncludeInlayParameterNameHintsWhenArgumentMatchesName: ${prop.initializer.getText()}`);
1448+
inlayHintPreferences.push(`IncludeInlayParameterNameHintsWhenArgumentMatchesName: ${prop.initializer.getText()}`);
14481449
break;
14491450
case "includeInlayFunctionParameterTypeHints":
1450-
preferences.push(`IncludeInlayFunctionParameterTypeHints: ${prop.initializer.getText()}`);
1451+
inlayHintPreferences.push(`IncludeInlayFunctionParameterTypeHints: ${prop.initializer.getText()}`);
14511452
break;
14521453
case "includeInlayVariableTypeHints":
1453-
preferences.push(`IncludeInlayVariableTypeHints: ${prop.initializer.getText()}`);
1454+
inlayHintPreferences.push(`IncludeInlayVariableTypeHints: ${prop.initializer.getText()}`);
14541455
break;
14551456
case "includeInlayVariableTypeHintsWhenTypeMatchesName":
1456-
preferences.push(`IncludeInlayVariableTypeHintsWhenTypeMatchesName: ${prop.initializer.getText()}`);
1457+
inlayHintPreferences.push(`IncludeInlayVariableTypeHintsWhenTypeMatchesName: ${prop.initializer.getText()}`);
14571458
break;
14581459
case "includeInlayPropertyDeclarationTypeHints":
1459-
preferences.push(`IncludeInlayPropertyDeclarationTypeHints: ${prop.initializer.getText()}`);
1460+
inlayHintPreferences.push(`IncludeInlayPropertyDeclarationTypeHints: ${prop.initializer.getText()}`);
14601461
break;
14611462
case "includeInlayFunctionLikeReturnTypeHints":
1462-
preferences.push(`IncludeInlayFunctionLikeReturnTypeHints: ${prop.initializer.getText()}`);
1463+
inlayHintPreferences.push(`IncludeInlayFunctionLikeReturnTypeHints: ${prop.initializer.getText()}`);
14631464
break;
14641465
case "includeInlayEnumMemberValueHints":
1465-
preferences.push(`IncludeInlayEnumMemberValueHints: ${prop.initializer.getText()}`);
1466+
inlayHintPreferences.push(`IncludeInlayEnumMemberValueHints: ${prop.initializer.getText()}`);
14661467
break;
14671468
case "interactiveInlayHints":
14681469
// Ignore, deprecated
@@ -1473,6 +1474,10 @@ function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefin
14731474
return undefined;
14741475
}
14751476
}
1477+
1478+
if (inlayHintPreferences.length > 0) {
1479+
preferences.push(`InlayHints: lsutil.InlayHintsPreferences{${inlayHintPreferences.join(",")}}`);
1480+
}
14761481
if (preferences.length === 0) {
14771482
return "nil /*preferences*/";
14781483
}
@@ -2936,7 +2941,8 @@ func Test${testName}(t *testing.T) {
29362941
${failingTests.has(testName) ? "t.Skip()" : ""}
29372942
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
29382943
const content = ${content}
2939-
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
2944+
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
2945+
defer done()
29402946
${isServer ? `f.MarkTestAsStradaServer()\n` : ""}${commands}
29412947
}`;
29422948
return template;

0 commit comments

Comments
 (0)