From e26071d96e1ff56289213dbe78415f836de8a70e Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Mon, 8 Oct 2018 22:38:33 +0100 Subject: Run prettier on all files --- editors/code/.vscode/launch.json | 14 ++----- editors/code/.vscode/settings.json | 2 +- editors/code/.vscode/tasks.json | 2 +- editors/code/package.json | 3 +- editors/code/src/commands/apply_source_change.ts | 24 +++++++++--- editors/code/src/commands/extend_selection.ts | 13 +++++-- editors/code/src/commands/index.ts | 2 +- editors/code/src/commands/join_lines.ts | 16 ++++++-- editors/code/src/commands/matching_brace.ts | 17 +++++--- editors/code/src/commands/parent_module.ts | 15 ++++++-- editors/code/src/commands/runnables.ts | 33 ++++++++++++---- editors/code/src/commands/syntaxTree.ts | 24 +++++++++--- editors/code/src/config.ts | 28 +++++++------- .../code/src/events/change_active_text_editor.ts | 15 ++++++-- editors/code/src/events/change_text_document.ts | 13 +++++-- editors/code/src/events/index.ts | 5 +-- editors/code/src/extension.ts | 28 +++++++++----- editors/code/src/highlighting.ts | 45 ++++++++++++++-------- editors/code/src/notifications/index.ts | 4 +- .../code/src/notifications/publish_decorations.ts | 11 +++--- editors/code/src/server.ts | 12 +++--- editors/code/tsconfig.json | 9 +---- editors/code/tslint.json | 14 +++---- 23 files changed, 220 insertions(+), 129 deletions(-) diff --git a/editors/code/.vscode/launch.json b/editors/code/.vscode/launch.json index c174db304..b9d14dddd 100644 --- a/editors/code/.vscode/launch.json +++ b/editors/code/.vscode/launch.json @@ -3,19 +3,15 @@ // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 { - "version": "0.2.0", + "version": "0.2.0", "configurations": [ { "name": "Extension", "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}" - ], - "outFiles": [ - "${workspaceFolder}/out/**/*.js" - ], + "args": ["--extensionDevelopmentPath=${workspaceFolder}"], + "outFiles": ["${workspaceFolder}/out/**/*.js"], "preLaunchTask": "npm: watch" }, { @@ -27,9 +23,7 @@ "--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/out/test" ], - "outFiles": [ - "${workspaceFolder}/out/test/**/*.js" - ], + "outFiles": ["${workspaceFolder}/out/test/**/*.js"], "preLaunchTask": "npm: watch" } ] diff --git a/editors/code/.vscode/settings.json b/editors/code/.vscode/settings.json index 30bf8c2d3..fa0a10487 100644 --- a/editors/code/.vscode/settings.json +++ b/editors/code/.vscode/settings.json @@ -8,4 +8,4 @@ }, // Turn off tsc task auto detection since we have the necessary tasks as npm scripts "typescript.tsc.autoDetect": "off" -} \ No newline at end of file +} diff --git a/editors/code/.vscode/tasks.json b/editors/code/.vscode/tasks.json index 604e38f5a..5deb2bccd 100644 --- a/editors/code/.vscode/tasks.json +++ b/editors/code/.vscode/tasks.json @@ -17,4 +17,4 @@ } } ] -} \ No newline at end of file +} diff --git a/editors/code/package.json b/editors/code/package.json index 8328a46c5..cd07e3be9 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -23,7 +23,8 @@ "travis": "npm run compile && npm run lint && npm run prettier --list-different" }, "prettier": { - "tabWidth": 4 + "tabWidth": 4, + "singleQuote": true }, "dependencies": { "vscode-languageclient": "^4.4.0" diff --git a/editors/code/src/commands/apply_source_change.ts b/editors/code/src/commands/apply_source_change.ts index 67765e5a3..cf921e3ac 100644 --- a/editors/code/src/commands/apply_source_change.ts +++ b/editors/code/src/commands/apply_source_change.ts @@ -20,8 +20,12 @@ export interface SourceChange { export async function handle(change: SourceChange) { const wsEdit = new vscode.WorkspaceEdit(); for (const sourceEdit of change.sourceFileEdits) { - const uri = Server.client.protocol2CodeConverter.asUri(sourceEdit.textDocument.uri); - const edits = Server.client.protocol2CodeConverter.asTextEdits(sourceEdit.edits); + const uri = Server.client.protocol2CodeConverter.asUri( + sourceEdit.textDocument.uri + ); + const edits = Server.client.protocol2CodeConverter.asTextEdits( + sourceEdit.edits + ); wsEdit.set(uri, edits); } let created; @@ -48,11 +52,19 @@ export async function handle(change: SourceChange) { const doc = await vscode.workspace.openTextDocument(toOpen); await vscode.window.showTextDocument(doc); } else if (toReveal) { - const uri = Server.client.protocol2CodeConverter.asUri(toReveal.textDocument.uri); - const position = Server.client.protocol2CodeConverter.asPosition(toReveal.position); + const uri = Server.client.protocol2CodeConverter.asUri( + toReveal.textDocument.uri + ); + const position = Server.client.protocol2CodeConverter.asPosition( + toReveal.position + ); const editor = vscode.window.activeTextEditor; - if (!editor || editor.document.uri.toString() !== uri.toString()) { return; } - if (!editor.selection.isEmpty) { return; } + if (!editor || editor.document.uri.toString() !== uri.toString()) { + return; + } + if (!editor.selection.isEmpty) { + return; + } editor!.selection = new vscode.Selection(position, position); } } diff --git a/editors/code/src/commands/extend_selection.ts b/editors/code/src/commands/extend_selection.ts index cdc3d10fb..0ee6bd11d 100644 --- a/editors/code/src/commands/extend_selection.ts +++ b/editors/code/src/commands/extend_selection.ts @@ -14,14 +14,19 @@ interface ExtendSelectionResult { export async function handle() { const editor = vscode.window.activeTextEditor; - if (editor == null || editor.document.languageId !== 'rust') { return; } + if (editor == null || editor.document.languageId !== 'rust') { + return; + } const request: ExtendSelectionParams = { - selections: editor.selections.map((s) => { + selections: editor.selections.map(s => { return Server.client.code2ProtocolConverter.asRange(s); }), - textDocument: { uri: editor.document.uri.toString() }, + textDocument: { uri: editor.document.uri.toString() } }; - const response = await Server.client.sendRequest('m/extendSelection', request); + const response = await Server.client.sendRequest( + 'm/extendSelection', + request + ); editor.selections = response.selections.map((range: Range) => { const r = Server.client.protocol2CodeConverter.asRange(range); return new vscode.Selection(r.start, r.end); diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts index dfdcd6454..2496c7ff8 100644 --- a/editors/code/src/commands/index.ts +++ b/editors/code/src/commands/index.ts @@ -13,5 +13,5 @@ export { matchingBrace, parentModule, runnables, - syntaxTree, + syntaxTree }; diff --git a/editors/code/src/commands/join_lines.ts b/editors/code/src/commands/join_lines.ts index 526b698cc..27d263b8a 100644 --- a/editors/code/src/commands/join_lines.ts +++ b/editors/code/src/commands/join_lines.ts @@ -2,7 +2,10 @@ import * as vscode from 'vscode'; import { Range, TextDocumentIdentifier } from 'vscode-languageclient'; import { Server } from '../server'; -import { handle as applySourceChange, SourceChange } from './apply_source_change'; +import { + handle as applySourceChange, + SourceChange +} from './apply_source_change'; interface JoinLinesParams { textDocument: TextDocumentIdentifier; @@ -11,11 +14,16 @@ interface JoinLinesParams { export async function handle() { const editor = vscode.window.activeTextEditor; - if (editor == null || editor.document.languageId !== 'rust') { return; } + if (editor == null || editor.document.languageId !== 'rust') { + return; + } const request: JoinLinesParams = { range: Server.client.code2ProtocolConverter.asRange(editor.selection), - textDocument: { uri: editor.document.uri.toString() }, + textDocument: { uri: editor.document.uri.toString() } }; - const change = await Server.client.sendRequest('m/joinLines', request); + const change = await Server.client.sendRequest( + 'm/joinLines', + request + ); await applySourceChange(change); } diff --git a/editors/code/src/commands/matching_brace.ts b/editors/code/src/commands/matching_brace.ts index a80446a8f..5e6638e82 100644 --- a/editors/code/src/commands/matching_brace.ts +++ b/editors/code/src/commands/matching_brace.ts @@ -10,16 +10,23 @@ interface FindMatchingBraceParams { export async function handle() { const editor = vscode.window.activeTextEditor; - if (editor == null || editor.document.languageId !== 'rust') { return; } + if (editor == null || editor.document.languageId !== 'rust') { + return; + } const request: FindMatchingBraceParams = { textDocument: { uri: editor.document.uri.toString() }, - offsets: editor.selections.map((s) => { + offsets: editor.selections.map(s => { return Server.client.code2ProtocolConverter.asPosition(s.active); - }), + }) }; - const response = await Server.client.sendRequest('m/findMatchingBrace', request); + const response = await Server.client.sendRequest( + 'm/findMatchingBrace', + request + ); editor.selections = editor.selections.map((sel, idx) => { - const active = Server.client.protocol2CodeConverter.asPosition(response[idx]); + const active = Server.client.protocol2CodeConverter.asPosition( + response[idx] + ); const anchor = sel.isEmpty ? active : sel.anchor; return new vscode.Selection(anchor, active); }); diff --git a/editors/code/src/commands/parent_module.ts b/editors/code/src/commands/parent_module.ts index d66fb3026..4bb92eb96 100644 --- a/editors/code/src/commands/parent_module.ts +++ b/editors/code/src/commands/parent_module.ts @@ -5,13 +5,20 @@ import { Server } from '../server'; export async function handle() { const editor = vscode.window.activeTextEditor; - if (editor == null || editor.document.languageId !== 'rust') { return; } + if (editor == null || editor.document.languageId !== 'rust') { + return; + } const request: TextDocumentIdentifier = { - uri: editor.document.uri.toString(), + uri: editor.document.uri.toString() }; - const response = await Server.client.sendRequest('m/parentModule', request); + const response = await Server.client.sendRequest( + 'm/parentModule', + request + ); const loc = response[0]; - if (loc == null) { return; } + if (loc == null) { + return; + } const uri = Server.client.protocol2CodeConverter.asUri(loc.uri); const range = Server.client.protocol2CodeConverter.asRange(loc.range); diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index 40f590dce..c234bfaec 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts @@ -41,39 +41,56 @@ function createTask(spec: Runnable): vscode.Task { label: 'cargo', command: spec.bin, args: spec.args, - env: spec.env, + env: spec.env }; const execCmd = `${definition.command} ${definition.args.join(' ')}`; const execOption: vscode.ShellExecutionOptions = { cwd: '.', - env: definition.env, + env: definition.env }; const exec = new vscode.ShellExecution(`clear; ${execCmd}`, execOption); const f = vscode.workspace.workspaceFolders![0]; - const t = new vscode.Task(definition, f, definition.label, TASK_SOURCE, exec, ['$rustc']); + const t = new vscode.Task( + definition, + f, + definition.label, + TASK_SOURCE, + exec, + ['$rustc'] + ); return t; } let prevRunnable: RunnableQuickPick | undefined; export async function handle() { const editor = vscode.window.activeTextEditor; - if (editor == null || editor.document.languageId !== 'rust') { return; } + if (editor == null || editor.document.languageId !== 'rust') { + return; + } const textDocument: lc.TextDocumentIdentifier = { - uri: editor.document.uri.toString(), + uri: editor.document.uri.toString() }; const params: RunnablesParams = { textDocument, - position: Server.client.code2ProtocolConverter.asPosition(editor.selection.active), + position: Server.client.code2ProtocolConverter.asPosition( + editor.selection.active + ) }; - const runnables = await Server.client.sendRequest('m/runnables', params); + const runnables = await Server.client.sendRequest( + 'm/runnables', + params + ); const items: RunnableQuickPick[] = []; if (prevRunnable) { items.push(prevRunnable); } for (const r of runnables) { - if (prevRunnable && JSON.stringify(prevRunnable.runnable) === JSON.stringify(r)) { + if ( + prevRunnable && + JSON.stringify(prevRunnable.runnable) === JSON.stringify(r) + ) { continue; } items.push(new RunnableQuickPick(r)); diff --git a/editors/code/src/commands/syntaxTree.ts b/editors/code/src/commands/syntaxTree.ts index dcb721eee..5d5cdd7a0 100644 --- a/editors/code/src/commands/syntaxTree.ts +++ b/editors/code/src/commands/syntaxTree.ts @@ -5,17 +5,25 @@ import { Server } from '../server'; export const syntaxTreeUri = vscode.Uri.parse('ra-lsp://syntaxtree'); -export class TextDocumentContentProvider implements vscode.TextDocumentContentProvider { +export class TextDocumentContentProvider + implements vscode.TextDocumentContentProvider { public eventEmitter = new vscode.EventEmitter(); public syntaxTree: string = 'Not available'; - public provideTextDocumentContent(uri: vscode.Uri): vscode.ProviderResult { + public provideTextDocumentContent( + uri: vscode.Uri + ): vscode.ProviderResult { const editor = vscode.window.activeTextEditor; - if (editor == null) { return ''; } + if (editor == null) { + return ''; + } const request: SyntaxTreeParams = { - textDocument: { uri: editor.document.uri.toString() }, + textDocument: { uri: editor.document.uri.toString() } }; - return Server.client.sendRequest('m/syntaxTree', request); + return Server.client.sendRequest( + 'm/syntaxTree', + request + ); } get onDidChange(): vscode.Event { @@ -34,5 +42,9 @@ type SyntaxTreeResult = string; // The contents of the file come from the `TextDocumentContentProvider` export async function handle() { const document = await vscode.workspace.openTextDocument(syntaxTreeUri); - return vscode.window.showTextDocument(document, vscode.ViewColumn.Two, true); + return vscode.window.showTextDocument( + document, + vscode.ViewColumn.Two, + true + ); } diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index b9ff3b810..7d05ea078 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -3,21 +3,23 @@ import * as vscode from 'vscode'; import { Server } from './server'; export class Config { - public highlightingOn = true; + public highlightingOn = true; - constructor() { - vscode.workspace.onDidChangeConfiguration((_) => this.userConfigChanged()); - this.userConfigChanged(); - } - - public userConfigChanged() { - const config = vscode.workspace.getConfiguration('ra-lsp'); - if (config.has('highlightingOn')) { - this.highlightingOn = config.get('highlightingOn') as boolean; + constructor() { + vscode.workspace.onDidChangeConfiguration(_ => + this.userConfigChanged() + ); + this.userConfigChanged(); } - if (!this.highlightingOn && Server) { - Server.highlighter.removeHighlights(); + public userConfigChanged() { + const config = vscode.workspace.getConfiguration('ra-lsp'); + if (config.has('highlightingOn')) { + this.highlightingOn = config.get('highlightingOn') as boolean; + } + + if (!this.highlightingOn && Server) { + Server.highlighter.removeHighlights(); + } } - } } diff --git a/editors/code/src/events/change_active_text_editor.ts b/editors/code/src/events/change_active_text_editor.ts index 3440aa0c3..0b7ceb65d 100644 --- a/editors/code/src/events/change_active_text_editor.ts +++ b/editors/code/src/events/change_active_text_editor.ts @@ -5,10 +5,19 @@ import { Decoration } from '../highlighting'; import { Server } from '../server'; export async function handle(editor: TextEditor | undefined) { - if (!Server.config.highlightingOn || !editor || editor.document.languageId !== 'rust') { return; } + if ( + !Server.config.highlightingOn || + !editor || + editor.document.languageId !== 'rust' + ) { + return; + } const params: TextDocumentIdentifier = { - uri: editor.document.uri.toString(), + uri: editor.document.uri.toString() }; - const decorations = await Server.client.sendRequest('m/decorationsRequest', params); + const decorations = await Server.client.sendRequest( + 'm/decorationsRequest', + params + ); Server.highlighter.setHighlights(editor, decorations); } diff --git a/editors/code/src/events/change_text_document.ts b/editors/code/src/events/change_text_document.ts index b3000e026..6be057245 100644 --- a/editors/code/src/events/change_text_document.ts +++ b/editors/code/src/events/change_text_document.ts @@ -1,11 +1,18 @@ import * as vscode from 'vscode'; -import { syntaxTreeUri, TextDocumentContentProvider } from '../commands/syntaxTree'; +import { + syntaxTreeUri, + TextDocumentContentProvider +} from '../commands/syntaxTree'; -export function createHandler(textDocumentContentProvider: TextDocumentContentProvider) { +export function createHandler( + textDocumentContentProvider: TextDocumentContentProvider +) { return (event: vscode.TextDocumentChangeEvent) => { const doc = event.document; - if (doc.languageId !== 'rust') { return; } + if (doc.languageId !== 'rust') { + return; + } afterLs(() => { textDocumentContentProvider.eventEmitter.fire(syntaxTreeUri); }); diff --git a/editors/code/src/events/index.ts b/editors/code/src/events/index.ts index b570a7a92..4c154563f 100644 --- a/editors/code/src/events/index.ts +++ b/editors/code/src/events/index.ts @@ -1,7 +1,4 @@ import * as changeActiveTextEditor from './change_active_text_editor'; import * as changeTextDocument from './change_text_document'; -export { - changeActiveTextEditor, - changeTextDocument, -}; +export { changeActiveTextEditor, changeTextDocument }; diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts index 44e74f4cc..81e1107a0 100644 --- a/editors/code/src/extension.ts +++ b/editors/code/src/extension.ts @@ -23,26 +23,34 @@ export function activate(context: vscode.ExtensionContext) { registerCommand('ra-lsp.joinLines', commands.joinLines.handle); registerCommand('ra-lsp.parentModule', commands.parentModule.handle); registerCommand('ra-lsp.run', commands.runnables.handle); - registerCommand('ra-lsp.applySourceChange', commands.applySourceChange.handle); + registerCommand( + 'ra-lsp.applySourceChange', + commands.applySourceChange.handle + ); // Notifications are events triggered by the language server - const allNotifications: Iterable<[string, lc.GenericNotificationHandler]> = [ - ['m/publishDecorations', notifications.publishDecorations.handle], - ]; + const allNotifications: Iterable< + [string, lc.GenericNotificationHandler] + > = [['m/publishDecorations', notifications.publishDecorations.handle]]; // The events below are plain old javascript events, triggered and handled by vscode - vscode.window.onDidChangeActiveTextEditor(events.changeActiveTextEditor.handle); + vscode.window.onDidChangeActiveTextEditor( + events.changeActiveTextEditor.handle + ); const textDocumentContentProvider = new TextDocumentContentProvider(); - disposeOnDeactivation(vscode.workspace.registerTextDocumentContentProvider( - 'ra-lsp', - textDocumentContentProvider, - )); + disposeOnDeactivation( + vscode.workspace.registerTextDocumentContentProvider( + 'ra-lsp', + textDocumentContentProvider + ) + ); vscode.workspace.onDidChangeTextDocument( events.changeTextDocument.createHandler(textDocumentContentProvider), null, - context.subscriptions); + context.subscriptions + ); // Start the language server, finally! Server.start(allNotifications); diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts index e2ac4d629..ceddffe0e 100644 --- a/editors/code/src/highlighting.ts +++ b/editors/code/src/highlighting.ts @@ -9,15 +9,24 @@ export interface Decoration { } export class Highlighter { - private static initDecorations(): Map { - const decor = (color: string) => vscode.window.createTextEditorDecorationType({ color }); + private static initDecorations(): Map< + string, + vscode.TextEditorDecorationType + > { + const decor = (color: string) => + vscode.window.createTextEditorDecorationType({ color }); - const decorations: Iterable<[string, vscode.TextEditorDecorationType]> = [ + const decorations: Iterable< + [string, vscode.TextEditorDecorationType] + > = [ ['background', decor('#3F3F3F')], - ['error', vscode.window.createTextEditorDecorationType({ - borderColor: 'red', - borderStyle: 'none none dashed none', - })], + [ + 'error', + vscode.window.createTextEditorDecorationType({ + borderColor: 'red', + borderStyle: 'none none dashed none' + }) + ], ['comment', decor('#7F9F7F')], ['string', decor('#CC9393')], ['keyword', decor('#F0DFAF')], @@ -26,13 +35,16 @@ export class Highlighter { ['builtin', decor('#DD6718')], ['text', decor('#DCDCCC')], ['attribute', decor('#BFEBBF')], - ['literal', decor('#DFAF8F')], + ['literal', decor('#DFAF8F')] ]; return new Map(decorations); } - private decorations: (Map | null) = null; + private decorations: Map< + string, + vscode.TextEditorDecorationType + > | null = null; public removeHighlights() { if (this.decorations == null) { @@ -47,10 +59,7 @@ export class Highlighter { this.decorations = null; } - public setHighlights( - editor: vscode.TextEditor, - highlights: Decoration[], - ) { + public setHighlights(editor: vscode.TextEditor, highlights: Decoration[]) { // Initialize decorations if necessary // // Note: decoration objects need to be kept around so we can dispose them @@ -68,13 +77,15 @@ export class Highlighter { if (!byTag.get(d.tag)) { continue; } - byTag.get(d.tag)!.push( - Server.client.protocol2CodeConverter.asRange(d.range), - ); + byTag + .get(d.tag)! + .push(Server.client.protocol2CodeConverter.asRange(d.range)); } for (const tag of byTag.keys()) { - const dec = this.decorations.get(tag) as vscode.TextEditorDecorationType; + const dec = this.decorations.get( + tag + ) as vscode.TextEditorDecorationType; const ranges = byTag.get(tag)!; editor.setDecorations(dec, ranges); } diff --git a/editors/code/src/notifications/index.ts b/editors/code/src/notifications/index.ts index c56576865..74c4c3563 100644 --- a/editors/code/src/notifications/index.ts +++ b/editors/code/src/notifications/index.ts @@ -1,5 +1,3 @@ import * as publishDecorations from './publish_decorations'; -export { - publishDecorations, -}; +export { publishDecorations }; diff --git a/editors/code/src/notifications/publish_decorations.ts b/editors/code/src/notifications/publish_decorations.ts index d8790386b..3180019b7 100644 --- a/editors/code/src/notifications/publish_decorations.ts +++ b/editors/code/src/notifications/publish_decorations.ts @@ -10,11 +10,10 @@ export interface PublishDecorationsParams { export function handle(params: PublishDecorationsParams) { const targetEditor = vscode.window.visibleTextEditors.find( - (editor) => editor.document.uri.toString() === params.uri, - ); - if (!Server.config.highlightingOn || !targetEditor) { return; } - Server.highlighter.setHighlights( - targetEditor, - params.decorations, + editor => editor.document.uri.toString() === params.uri ); + if (!Server.config.highlightingOn || !targetEditor) { + return; + } + Server.highlighter.setHighlights(targetEditor, params.decorations); } diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index 01fd80756..196fc3ebc 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts @@ -8,24 +8,26 @@ export class Server { public static config = new Config(); public static client: lc.LanguageClient; - public static start(notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]>) { + public static start( + notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]> + ) { const run: lc.Executable = { command: 'ra_lsp_server', - options: { cwd: '.' }, + options: { cwd: '.' } }; const serverOptions: lc.ServerOptions = { run, - debug: run, + debug: run }; const clientOptions: lc.LanguageClientOptions = { - documentSelector: [{ scheme: 'file', language: 'rust' }], + documentSelector: [{ scheme: 'file', language: 'rust' }] }; Server.client = new lc.LanguageClient( 'ra-lsp', 'rust-analyzer languge server', serverOptions, - clientOptions, + clientOptions ); Server.client.onReady().then(() => { for (const [type, handler] of notificationHandlers) { diff --git a/editors/code/tsconfig.json b/editors/code/tsconfig.json index ebec01624..ef93c52b7 100644 --- a/editors/code/tsconfig.json +++ b/editors/code/tsconfig.json @@ -3,15 +3,10 @@ "module": "commonjs", "target": "es6", "outDir": "out", - "lib": [ - "es6" - ], + "lib": ["es6"], "sourceMap": true, "rootDir": "src", "strict": true }, - "exclude": [ - "node_modules", - ".vscode-test" - ] + "exclude": ["node_modules", ".vscode-test"] } diff --git a/editors/code/tslint.json b/editors/code/tslint.json index c2525a9db..bdeb4895e 100644 --- a/editors/code/tslint.json +++ b/editors/code/tslint.json @@ -1,9 +1,9 @@ { - "defaultSeverity": "error", - "extends": ["tslint:recommended", "tslint-config-prettier"], - "rules": { - "quotemark": [true, "single"], - "interface-name": false, - "object-literal-sort-keys": false - } + "defaultSeverity": "error", + "extends": ["tslint:recommended", "tslint-config-prettier"], + "rules": { + "quotemark": [true, "single"], + "interface-name": false, + "object-literal-sort-keys": false + } } -- cgit v1.2.3