Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/modern-vscode-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/language-service": patch
---

Update the setup command to configure VS Code with the unified `js/ts` TypeScript settings.
12 changes: 6 additions & 6 deletions packages/harness-effect-v3/__snapshots__/setup-cli.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ exports[`Setup CLI > should add LSP plugin alongside existing plugins > tsconfig

exports[`Setup CLI > should add LSP with VS Code editor selected and configure VS Code settings > .vscode/settings.json 1`] = `
"{
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"js/ts.tsdk.path": "./node_modules/typescript/lib",
"js/ts.tsdk.promptToUseWorkspaceVersion": true
}"
`;

Expand All @@ -112,7 +112,7 @@ exports[`Setup CLI > should add LSP with VS Code editor selected and configure V
"file": "tsconfig.json",
},
{
"description": "Add typescript.tsdk setting; Add typescript.enablePromptUseWorkspaceTsdk setting",
"description": "Add js/ts.tsdk.path setting; Add js/ts.tsdk.promptToUseWorkspaceVersion setting",
"file": ".vscode/settings.json",
},
]
Expand Down Expand Up @@ -568,8 +568,8 @@ exports[`Setup CLI > should preserve existing VSCode settings when adding LSP-sp
"editor.formatOnSave": true,
"editor.tabSize": 2,
"files.autoSave": "onFocusChange",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "./node_modules/typescript/lib"
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
"js/ts.tsdk.path": "./node_modules/typescript/lib"
}"
`;

Expand All @@ -584,7 +584,7 @@ exports[`Setup CLI > should preserve existing VSCode settings when adding LSP-sp
"file": "tsconfig.json",
},
{
"description": "Add typescript.tsdk setting; Add typescript.enablePromptUseWorkspaceTsdk setting",
"description": "Add js/ts.tsdk.path setting; Add js/ts.tsdk.promptToUseWorkspaceVersion setting",
"file": ".vscode/settings.json",
},
]
Expand Down
12 changes: 6 additions & 6 deletions packages/harness-effect-v4/__snapshots__/setup-cli.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ exports[`Setup CLI > should add LSP plugin alongside existing plugins > tsconfig

exports[`Setup CLI > should add LSP with VS Code editor selected and configure VS Code settings > .vscode/settings.json 1`] = `
"{
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"js/ts.tsdk.path": "./node_modules/typescript/lib",
"js/ts.tsdk.promptToUseWorkspaceVersion": true
}"
`;

Expand All @@ -112,7 +112,7 @@ exports[`Setup CLI > should add LSP with VS Code editor selected and configure V
"file": "tsconfig.json",
},
{
"description": "Add typescript.tsdk setting; Add typescript.enablePromptUseWorkspaceTsdk setting",
"description": "Add js/ts.tsdk.path setting; Add js/ts.tsdk.promptToUseWorkspaceVersion setting",
"file": ".vscode/settings.json",
},
]
Expand Down Expand Up @@ -568,8 +568,8 @@ exports[`Setup CLI > should preserve existing VSCode settings when adding LSP-sp
"editor.formatOnSave": true,
"editor.tabSize": 2,
"files.autoSave": "onFocusChange",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "./node_modules/typescript/lib"
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
"js/ts.tsdk.path": "./node_modules/typescript/lib"
}"
`;

Expand All @@ -584,7 +584,7 @@ exports[`Setup CLI > should preserve existing VSCode settings when adding LSP-sp
"file": "tsconfig.json",
},
{
"description": "Add typescript.tsdk setting; Add typescript.enablePromptUseWorkspaceTsdk setting",
"description": "Add js/ts.tsdk.path setting; Add js/ts.tsdk.promptToUseWorkspaceVersion setting",
"file": ".vscode/settings.json",
},
]
Expand Down
4 changes: 2 additions & 2 deletions packages/language-service/src/cli/setup/changes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export const computeChanges = (
if (Option.isSome(target.packageJson.lspVersion) && Option.isSome(assessment.vscodeSettings)) {
const vscodeTarget: Target.VSCodeSettings = {
settings: {
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"js/ts.tsdk.path": "./node_modules/typescript/lib",
"js/ts.tsdk.promptToUseWorkspaceVersion": true
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/language-service/test/setup-cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,9 @@ describe("Setup CLI", () => {
}
},
{
"typescript.tsdk": "./packages/core/node_modules/typescript/lib",
"js/ts.tsdk.path": "./packages/core/node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.enablePromptUseWorkspaceTsdk": true,
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
"editor.formatOnSave": true,
"eslint.format.enable": true,
"editor.acceptSuggestionOnCommitCharacter": true,
Expand Down
Loading