Skip to content

Commit 92bc6e5

Browse files
committed
feat(vscode): prompt to disable svelte extension
1 parent 9b41ca1 commit 92bc6e5

File tree

1 file changed

+13
-35
lines changed

1 file changed

+13
-35
lines changed

extensions/vscode/src/features/doctor.ts

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,19 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan
143143
});
144144
}
145145

146+
// #3942, https://github.com/microsoft/TypeScript/issues/57633
147+
const svelte = vscode.extensions.getExtension('svelte.svelte-vscode');
148+
if (svelte) {
149+
problems.push({
150+
title: 'Recommended to disable Svelte extension in Vue workspace',
151+
message: [
152+
`Svelte's TypeScript Plugin and Vue's TypeScript Plugin are known to cause some conflicts. Until the problem is resolved, it is recommended that you temporarily disable the Svelte extension in the Vue workspace.`,
153+
'',
154+
'Issues: https://github.com/vuejs/language-tools/issues/3942, https://github.com/microsoft/TypeScript/issues/57633',
155+
].join('\n'),
156+
});
157+
}
158+
146159
// check using pug but don't install @vue/language-plugin-pug
147160
if (
148161
sfc?.descriptor.template?.lang === 'pug'
@@ -209,41 +222,6 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan
209222
});
210223
}
211224

212-
/*
213-
// check outdated language services plugins
214-
const knownPlugins = [
215-
// '@volar-plugins/css',
216-
// '@volar-plugins/emmet',
217-
'@volar-plugins/eslint',
218-
// '@volar-plugins/html',
219-
// '@volar-plugins/json',
220-
'@volar-plugins/prettier',
221-
'@volar-plugins/prettyhtml',
222-
'@volar-plugins/pug-beautify',
223-
'@volar-plugins/sass-formatter',
224-
'@volar-plugins/tslint',
225-
// '@volar-plugins/typescript',
226-
// '@volar-plugins/typescript-twoslash-queries',
227-
'@volar-plugins/vetur',
228-
];
229-
for (const plugin of knownPlugins) {
230-
const pluginMod = await getPackageJsonOfWorkspacePackage(fileUri.fsPath, plugin);
231-
if (!pluginMod) continue;
232-
if (!pluginMod.json.version.startsWith('2.')) {
233-
problems.push({
234-
title: `Outdated ${plugin}`,
235-
message: [
236-
`The ${plugin} plugin is outdated. Please update it to the latest version.`,
237-
'',
238-
'- plugin package.json: ' + pluginMod.path,
239-
'- plugin version: ' + pluginMod.json.version,
240-
'- expected version: >= 2.0.0',
241-
].join('\n'),
242-
});
243-
}
244-
}
245-
*/
246-
247225
// check tsdk version should be higher than 5.0.0
248226
const tsdk = await getTsdk(context);
249227
if (tsdk.version && !semver.gte(tsdk.version, '5.0.0')) {

0 commit comments

Comments
 (0)