mirror of
https://github.com/Microsoft/vscode
synced 2024-09-29 16:01:05 +00:00
css/json/html web: adopt LanguageClient API change (#218060)
This commit is contained in:
parent
1b27e602ed
commit
a28cbc207a
|
@ -8,13 +8,6 @@ import { BaseLanguageClient, LanguageClientOptions } from 'vscode-languageclient
|
|||
import { startClient, LanguageClientConstructor } from '../cssClient';
|
||||
import { LanguageClient } from 'vscode-languageclient/browser';
|
||||
|
||||
declare const Worker: {
|
||||
new(stringUrl: string): any;
|
||||
};
|
||||
declare const TextDecoder: {
|
||||
new(encoding?: string): { decode(buffer: ArrayBuffer): string };
|
||||
};
|
||||
|
||||
let client: BaseLanguageClient | undefined;
|
||||
|
||||
// this method is called when vs code is activated
|
||||
|
@ -25,7 +18,7 @@ export async function activate(context: ExtensionContext) {
|
|||
worker.postMessage({ i10lLocation: l10n.uri?.toString(false) ?? '' });
|
||||
|
||||
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
||||
return new LanguageClient(id, name, clientOptions, worker);
|
||||
return new LanguageClient(id, name, worker, clientOptions);
|
||||
};
|
||||
|
||||
client = await startClient(context, newLanguageClient, { TextDecoder });
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out"
|
||||
"outDir": "./out",
|
||||
"lib": [
|
||||
"webworker"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
|
|
|
@ -8,13 +8,6 @@ import { LanguageClientOptions } from 'vscode-languageclient';
|
|||
import { startClient, LanguageClientConstructor, AsyncDisposable } from '../htmlClient';
|
||||
import { LanguageClient } from 'vscode-languageclient/browser';
|
||||
|
||||
declare const Worker: {
|
||||
new(stringUrl: string): any;
|
||||
};
|
||||
declare const TextDecoder: {
|
||||
new(encoding?: string): { decode(buffer: ArrayBuffer): string };
|
||||
};
|
||||
|
||||
let client: AsyncDisposable | undefined;
|
||||
|
||||
// this method is called when vs code is activated
|
||||
|
@ -25,7 +18,7 @@ export async function activate(context: ExtensionContext) {
|
|||
worker.postMessage({ i10lLocation: l10n.uri?.toString(false) ?? '' });
|
||||
|
||||
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
||||
return new LanguageClient(id, name, clientOptions, worker);
|
||||
return new LanguageClient(id, name, worker, clientOptions);
|
||||
};
|
||||
|
||||
const timer = {
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out"
|
||||
"outDir": "./out",
|
||||
"lib": [
|
||||
"webworker"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
|
|
|
@ -8,12 +8,6 @@ import { LanguageClientOptions } from 'vscode-languageclient';
|
|||
import { startClient, LanguageClientConstructor, SchemaRequestService, AsyncDisposable, languageServerDescription } from '../jsonClient';
|
||||
import { LanguageClient } from 'vscode-languageclient/browser';
|
||||
|
||||
declare const Worker: {
|
||||
new(stringUrl: string): any;
|
||||
};
|
||||
|
||||
declare function fetch(uri: string, options: any): any;
|
||||
|
||||
let client: AsyncDisposable | undefined;
|
||||
|
||||
// this method is called when vs code is activated
|
||||
|
@ -24,7 +18,7 @@ export async function activate(context: ExtensionContext) {
|
|||
worker.postMessage({ i10lLocation: l10n.uri?.toString(false) ?? '' });
|
||||
|
||||
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
||||
return new LanguageClient(id, name, clientOptions, worker);
|
||||
return new LanguageClient(id, name, worker, clientOptions);
|
||||
};
|
||||
|
||||
const schemaRequests: SchemaRequestService = {
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out"
|
||||
"outDir": "./out",
|
||||
"lib": [
|
||||
"webworker"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
|
|
Loading…
Reference in a new issue