Skip to content

Commit 560025f

Browse files
committed
Merge branch 'main' into jabaile/semantic-tokens
2 parents eac5894 + 7c40d35 commit 560025f

File tree

2,871 files changed

+6313
-3095
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,871 files changed

+6313
-3095
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
@@ -1421,6 +1421,7 @@ function stringToTristate(s: string): string {
14211421
}
14221422

14231423
function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefined {
1424+
const inlayHintPreferences: string[] = [];
14241425
const preferences: string[] = [];
14251426
for (const prop of arg.properties) {
14261427
if (ts.isPropertyAssignment(prop)) {
@@ -1463,28 +1464,28 @@ function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefin
14631464
paramHint = "lsutil.IncludeInlayParameterNameHintsAll";
14641465
break;
14651466
}
1466-
preferences.push(`IncludeInlayParameterNameHints: ${paramHint}`);
1467+
inlayHintPreferences.push(`IncludeInlayParameterNameHints: ${paramHint}`);
14671468
break;
14681469
case "includeInlayParameterNameHintsWhenArgumentMatchesName":
1469-
preferences.push(`IncludeInlayParameterNameHintsWhenArgumentMatchesName: ${prop.initializer.getText()}`);
1470+
inlayHintPreferences.push(`IncludeInlayParameterNameHintsWhenArgumentMatchesName: ${prop.initializer.getText()}`);
14701471
break;
14711472
case "includeInlayFunctionParameterTypeHints":
1472-
preferences.push(`IncludeInlayFunctionParameterTypeHints: ${prop.initializer.getText()}`);
1473+
inlayHintPreferences.push(`IncludeInlayFunctionParameterTypeHints: ${prop.initializer.getText()}`);
14731474
break;
14741475
case "includeInlayVariableTypeHints":
1475-
preferences.push(`IncludeInlayVariableTypeHints: ${prop.initializer.getText()}`);
1476+
inlayHintPreferences.push(`IncludeInlayVariableTypeHints: ${prop.initializer.getText()}`);
14761477
break;
14771478
case "includeInlayVariableTypeHintsWhenTypeMatchesName":
1478-
preferences.push(`IncludeInlayVariableTypeHintsWhenTypeMatchesName: ${prop.initializer.getText()}`);
1479+
inlayHintPreferences.push(`IncludeInlayVariableTypeHintsWhenTypeMatchesName: ${prop.initializer.getText()}`);
14791480
break;
14801481
case "includeInlayPropertyDeclarationTypeHints":
1481-
preferences.push(`IncludeInlayPropertyDeclarationTypeHints: ${prop.initializer.getText()}`);
1482+
inlayHintPreferences.push(`IncludeInlayPropertyDeclarationTypeHints: ${prop.initializer.getText()}`);
14821483
break;
14831484
case "includeInlayFunctionLikeReturnTypeHints":
1484-
preferences.push(`IncludeInlayFunctionLikeReturnTypeHints: ${prop.initializer.getText()}`);
1485+
inlayHintPreferences.push(`IncludeInlayFunctionLikeReturnTypeHints: ${prop.initializer.getText()}`);
14851486
break;
14861487
case "includeInlayEnumMemberValueHints":
1487-
preferences.push(`IncludeInlayEnumMemberValueHints: ${prop.initializer.getText()}`);
1488+
inlayHintPreferences.push(`IncludeInlayEnumMemberValueHints: ${prop.initializer.getText()}`);
14881489
break;
14891490
case "interactiveInlayHints":
14901491
// Ignore, deprecated
@@ -1495,6 +1496,10 @@ function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefin
14951496
return undefined;
14961497
}
14971498
}
1499+
1500+
if (inlayHintPreferences.length > 0) {
1501+
preferences.push(`InlayHints: lsutil.InlayHintsPreferences{${inlayHintPreferences.join(",")}}`);
1502+
}
14981503
if (preferences.length === 0) {
14991504
return "nil /*preferences*/";
15001505
}
@@ -3040,7 +3045,8 @@ func Test${testName}(t *testing.T) {
30403045
${failingTests.has(testName) ? "t.Skip()" : ""}
30413046
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
30423047
const content = ${content}
3043-
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
3048+
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
3049+
defer done()
30443050
${isServer ? `f.MarkTestAsStradaServer()\n` : ""}${commands}
30453051
}`;
30463052
return template;

0 commit comments

Comments
 (0)