[html/css/json] pass the location of the localization bundle to the server (#168111)

pass the location of the localization bundle to the server
This commit is contained in:
Martin Aeschlimann
2022-12-05 23:49:27 +01:00
committed by GitHub
parent 6e3976f744
commit b27ee6b7b5
15 changed files with 88 additions and 12 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { getNodeFileFS } from './nodeFs';
import { Disposable, ExtensionContext } from 'vscode';
import { Disposable, ExtensionContext, l10n } from 'vscode';
import { startClient, LanguageClientConstructor, AsyncDisposable } from '../htmlClient';
import { ServerOptions, TransportKind, LanguageClientOptions, LanguageClient } from 'vscode-languageclient/node';
import { TextDecoder } from 'util';
@@ -45,6 +45,10 @@ export async function activate(context: ExtensionContext) {
}
};
// pass the location of the localization bundle to the server
process.env['VSCODE_L10N_BUNDLE_LOCATION'] = l10n.uri?.toString() ?? '';
client = await startClient(context, newLanguageClient, { fileFs: getNodeFileFS(), TextDecoder, telemetry, timer });
}