aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/client.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/client.ts')
-rw-r--r--editors/code/src/client.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index a6fb04536..4484b2167 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -10,7 +10,7 @@ export async function createClient(config: Config): Promise<null | lc.LanguageCl
10 // It might be a good idea to test if the uri points to a file. 10 // It might be a good idea to test if the uri points to a file.
11 const workspaceFolderPath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath ?? '.'; 11 const workspaceFolderPath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath ?? '.';
12 12
13 const langServerPath = await ensureLanguageServerBinary(config.langServerBinarySource()); 13 const langServerPath = await ensureLanguageServerBinary(config.langServerBinarySource);
14 if (!langServerPath) return null; 14 if (!langServerPath) return null;
15 15
16 const run: lc.Executable = { 16 const run: lc.Executable = {
@@ -24,23 +24,23 @@ export async function createClient(config: Config): Promise<null | lc.LanguageCl
24 const traceOutputChannel = vscode.window.createOutputChannel( 24 const traceOutputChannel = vscode.window.createOutputChannel(
25 'Rust Analyzer Language Server Trace', 25 'Rust Analyzer Language Server Trace',
26 ); 26 );
27 const cargoWatchOpts = config.cargoWatchOptions(); 27 const cargoWatchOpts = config.cargoWatchOptions;
28 28
29 const clientOptions: lc.LanguageClientOptions = { 29 const clientOptions: lc.LanguageClientOptions = {
30 documentSelector: [{ scheme: 'file', language: 'rust' }], 30 documentSelector: [{ scheme: 'file', language: 'rust' }],
31 initializationOptions: { 31 initializationOptions: {
32 publishDecorations: true, 32 publishDecorations: true,
33 lruCapacity: config.lruCapacity(), 33 lruCapacity: config.lruCapacity,
34 maxInlayHintLength: config.maxInlayHintLength(), 34 maxInlayHintLength: config.maxInlayHintLength,
35 cargoWatchEnable: cargoWatchOpts.enable, 35 cargoWatchEnable: cargoWatchOpts.enable,
36 cargoWatchArgs: cargoWatchOpts.arguments, 36 cargoWatchArgs: cargoWatchOpts.arguments,
37 cargoWatchCommand: cargoWatchOpts.command, 37 cargoWatchCommand: cargoWatchOpts.command,
38 cargoWatchAllTargets: cargoWatchOpts.allTargets, 38 cargoWatchAllTargets: cargoWatchOpts.allTargets,
39 excludeGlobs: config.excludeGlobs(), 39 excludeGlobs: config.excludeGlobs,
40 useClientWatching: config.useClientWatching(), 40 useClientWatching: config.useClientWatching,
41 featureFlags: config.featureFlags(), 41 featureFlags: config.featureFlags,
42 withSysroot: config.withSysroot(), 42 withSysroot: config.withSysroot,
43 cargoFeatures: config.cargoFeatures(), 43 cargoFeatures: config.cargoFeatures,
44 }, 44 },
45 traceOutputChannel, 45 traceOutputChannel,
46 }; 46 };