Skip to content

Commit

Permalink
feat: disable "enableProjectDiagnostics" on enable (#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeemrmn authored Oct 24, 2024
1 parent df2633e commit 0361a50
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions client/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,25 @@ export function enable(
const config = vscode.workspace.getConfiguration(EXTENSION_NS);
await config.update("enable", true);
vscode.window.showInformationMessage("Deno workspace initialized.");
const tsserverConfig = vscode.workspace.getConfiguration(
"typescript.tsserver",
);
if (tsserverConfig.get<boolean>("experimental.enableProjectDiagnostics")) {
try {
await tsserverConfig.update(
"experimental.enableProjectDiagnostics",
false,
vscode.ConfigurationTarget.Workspace,
);
vscode.window.showInformationMessage(
'Disabled "typescript.tsserver.experimental.enableProjectDiagnostics" for the workspace. The Deno extension is incompatible with this setting. See: https://github.com/denoland/vscode_deno/issues/437#issuecomment-1720393193.',
);
} catch {
vscode.window.showWarningMessage(
'Setting "typescript.tsserver.experimental.enableProjectDiagnostics" is incompatible with the Deno extension. Either disable it in your user settings, or create a workspace and run the "Deno: Enable" command again. See: https://github.com/denoland/vscode_deno/issues/437#issuecomment-1720393193.',
);
}
}
};
}

Expand Down

0 comments on commit 0361a50

Please sign in to comment.