From 273299693b85996878907ad256ed55f072ec3f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 9 Dec 2019 20:57:55 +0200 Subject: Code: enable prettier trailing commas --- editors/code/src/server.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'editors/code/src/server.ts') diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index e767b6f1b..2fe45f1ed 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts @@ -19,7 +19,7 @@ export class Server { public static client: lc.LanguageClient; public static async start( - notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]> + notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]>, ) { // '.' Is the fallback if no folder is open // TODO?: Workspace folders support Uri's (eg: file://test.txt). It might be a good idea to test if the uri points to a file. @@ -34,20 +34,20 @@ export class Server { if (platform() !== 'win32') { if (!(await lookpath(command))) { throw new Error( - `Cannot find rust-analyzer server \`${command}\` in PATH.` + `Cannot find rust-analyzer server \`${command}\` in PATH.`, ); } } const run: lc.Executable = { command, - options: { cwd: folder } + options: { cwd: folder }, }; const serverOptions: lc.ServerOptions = { run, - debug: run + debug: run, }; const traceOutputChannel = window.createOutputChannel( - 'Rust Analyzer Language Server Trace' + 'Rust Analyzer Language Server Trace', ); const clientOptions: lc.LanguageClientOptions = { documentSelector: [{ scheme: 'file', language: 'rust' }], @@ -58,16 +58,16 @@ export class Server { excludeGlobs: Server.config.excludeGlobs, useClientWatching: Server.config.useClientWatching, featureFlags: Server.config.featureFlags, - withSysroot: Server.config.withSysroot + withSysroot: Server.config.withSysroot, }, - traceOutputChannel + traceOutputChannel, }; Server.client = new lc.LanguageClient( 'rust-analyzer', 'Rust Analyzer Language Server', serverOptions, - clientOptions + clientOptions, ); // HACK: This is an awful way of filtering out the decorations notifications // However, pending proper support, this is the most effecitve approach @@ -80,10 +80,10 @@ export class Server { if (typeof messageOrDataObject === 'string') { if ( messageOrDataObject.includes( - 'rust-analyzer/publishDecorations' + 'rust-analyzer/publishDecorations', ) || messageOrDataObject.includes( - 'rust-analyzer/decorationsRequest' + 'rust-analyzer/decorationsRequest', ) ) { // Don't log publish decorations requests @@ -95,7 +95,7 @@ export class Server { // @ts-ignore Server.client.logObjectTrace(messageOrDataObject); } - } + }, }; Server.client.registerProposedFeatures(); Server.client.onReady().then(() => { -- cgit v1.2.3