Send the config from the client

This commit is contained in:
Kirill Bulatov 2020-03-20 00:42:18 +02:00
parent 019f269a0a
commit a9dd442733
2 changed files with 28 additions and 24 deletions

View file

@ -2,7 +2,7 @@ import * as vscode from 'vscode';
import * as lc from 'vscode-languageclient';
import { Config } from './config';
import { createClient } from './client';
import { createClient, configToOptions } from './client';
import { isRustEditor, RustEditor } from './util';
export class Ctx {
@ -20,6 +20,7 @@ export class Ctx {
const res = new Ctx(config, extCtx, client, serverPath);
res.pushCleanup(client.start());
await client.onReady();
client.onRequest('workspace/configuration', _ => [configToOptions(config)]);
return res;
}