mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
[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:
committed by
GitHub
parent
6e3976f744
commit
b27ee6b7b5
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Disposable, ExtensionContext, Uri } from 'vscode';
|
||||
import { Disposable, ExtensionContext, Uri, l10n } from 'vscode';
|
||||
import { LanguageClientOptions } from 'vscode-languageclient';
|
||||
import { startClient, LanguageClientConstructor, AsyncDisposable } from '../htmlClient';
|
||||
import { LanguageClient } from 'vscode-languageclient/browser';
|
||||
@@ -22,6 +22,8 @@ export async function activate(context: ExtensionContext) {
|
||||
const serverMain = Uri.joinPath(context.extensionUri, 'server/dist/browser/htmlServerMain.js');
|
||||
try {
|
||||
const worker = new Worker(serverMain.toString());
|
||||
worker.postMessage({ i10lLocation: l10n.uri?.toString(false) ?? '' });
|
||||
|
||||
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
||||
return new LanguageClient(id, name, clientOptions, worker);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user