mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-11 09:09:46 +01:00
Fixes #3086
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../gulpfile.plugins.js compile-plugin:typescript ./src/tsconfig.json"
|
||||
},
|
||||
"activationEvents": [
|
||||
"onLanguage:javascript",
|
||||
"onLanguage:javascriptreact",
|
||||
"onLanguage:typescript",
|
||||
"onLanguage:typescriptreact",
|
||||
"onCommand:typescript.reloadProjects"
|
||||
|
||||
@@ -51,11 +51,8 @@ export function activate(context: ExtensionContext): void {
|
||||
client.onReady().then(() => {
|
||||
registerSupports(MODE_ID_TS, clientHost, client);
|
||||
registerSupports(MODE_ID_TSX, clientHost, client);
|
||||
let useSalsa = !!process.env['CODE_TSJS'] || !!process.env['VSCODE_TSJS'];
|
||||
if (useSalsa) {
|
||||
registerSupports(MODE_ID_JS, clientHost, client);
|
||||
registerSupports(MODE_ID_JSX, clientHost, client);
|
||||
}
|
||||
registerSupports(MODE_ID_JS, clientHost, client);
|
||||
registerSupports(MODE_ID_JSX, clientHost, client);
|
||||
}, () => {
|
||||
// Nothing to do here. The client did show a message;
|
||||
});
|
||||
|
||||
@@ -12,7 +12,8 @@ import {LanguageExtensions} from 'vs/editor/common/modes/languageExtensionPoint'
|
||||
import Options = require('vs/languages/typescript/common/options');
|
||||
let defaults = Options.javaScriptOptions;
|
||||
|
||||
if (!env.enableTypeScriptServiceModeForJS) {
|
||||
let enable = false;
|
||||
if (enable) {
|
||||
|
||||
LanguageExtensions.registerCompatMode({
|
||||
id: 'javascript',
|
||||
|
||||
@@ -126,17 +126,6 @@ export class PluginScanner {
|
||||
});
|
||||
return null;
|
||||
}
|
||||
// This is a workaround to enable Salsa and avoid TS extension loading
|
||||
// for JavaScript (see https://github.com/Microsoft/vscode/issues/2225)
|
||||
if (pluginDescFromFile.name === 'typescript' && pluginDescFromFile.publisher === 'vscode' && (!!process.env['CODE_TSJS'] || !!process.env['VSCODE_TSJS'])) {
|
||||
pluginDescFromFile.activationEvents = pluginDescFromFile.activationEvents || [];
|
||||
if (pluginDescFromFile.activationEvents.indexOf('onLanguage:javascript') === -1) {
|
||||
pluginDescFromFile.activationEvents.push('onLanguage:javascript');
|
||||
}
|
||||
if (pluginDescFromFile.activationEvents.indexOf('onLanguage:javascriptreact') === -1) {
|
||||
pluginDescFromFile.activationEvents.push('onLanguage:javascriptreact');
|
||||
}
|
||||
}
|
||||
|
||||
let extension = paths.extname(absoluteManifestPath);
|
||||
let basename = absoluteManifestPath.substr(0, absoluteManifestPath.length - extension.length);
|
||||
|
||||
Reference in New Issue
Block a user