Skip to content

Commit ec92128

Browse files
committed
Prettier completion.ts
1 parent 00216c4 commit ec92128

File tree

1 file changed

+11
-8
lines changed
  • packages/jupyterlab-lsp/src/adapters/jupyterlab/components

1 file changed

+11
-8
lines changed

packages/jupyterlab-lsp/src/adapters/jupyterlab/components/completion.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import { LSPConnection } from '../../../connection';
2121
import { Session } from '@jupyterlab/services';
2222
import ICompletionItemsResponseType = CompletionHandler.ICompletionItemsResponseType;
2323

24-
2524
/**
2625
* A LSP connector for completion handlers.
2726
*/
28-
export class LSPConnector implements CompletionHandler.ICompletionItemsConnector {
27+
export class LSPConnector
28+
implements CompletionHandler.ICompletionItemsConnector {
2929
isDisposed = false;
3030
private _editor: CodeEditor.IEditor;
3131
private _connections: Map<VirtualDocument.id_path, LSPConnection>;
@@ -172,7 +172,9 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
172172
position_in_token
173173
).catch(e => {
174174
console.warn('LSP: hint failed', e);
175-
return this.fallback_connector.fetch(request).then(this.transform_reply);
175+
return this.fallback_connector
176+
.fetch(request)
177+
.then(this.transform_reply);
176178
});
177179
} catch (e) {
178180
console.warn('LSP: kernel completions failed', e);
@@ -254,7 +256,7 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
254256
// but it did not work for "from statistics <tab>" and lead to "from statisticsimport" (no space)
255257
start: token.offset + (all_non_prefixed ? 1 : 0),
256258
end: token.offset + prefix.length,
257-
items: items,
259+
items: items
258260
};
259261
}
260262

@@ -305,7 +307,7 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
305307
// For some reason the _jupyter_types_experimental list has two entries
306308
// for each match, with one having a type of "<unknown>". Discard those
307309
// and use undefined to indicate an unknown type.
308-
labelSet.has(item.label)// ||
310+
labelSet.has(item.label) // ||
309311
// (item.type && item.type === '<unknown>')
310312
) {
311313
return;
@@ -318,9 +320,11 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
318320
return { ...lsp, items: processedItems };
319321
}
320322

321-
list(query: string | undefined): Promise<{
323+
list(
324+
query: string | undefined
325+
): Promise<{
322326
ids: CompletionHandler.IRequest[];
323-
values: CompletionHandler.ICompletionItemsReply[]
327+
values: CompletionHandler.ICompletionItemsReply[];
324328
}> {
325329
return Promise.resolve(undefined);
326330
}
@@ -334,7 +338,6 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
334338
save(id: CompletionHandler.IRequest, value: void): Promise<any> {
335339
return Promise.resolve(undefined);
336340
}
337-
338341
}
339342

340343
/**

0 commit comments

Comments
 (0)