@@ -21,11 +21,11 @@ import { LSPConnection } from '../../../connection';
21
21
import { Session } from '@jupyterlab/services' ;
22
22
import ICompletionItemsResponseType = CompletionHandler . ICompletionItemsResponseType ;
23
23
24
-
25
24
/**
26
25
* A LSP connector for completion handlers.
27
26
*/
28
- export class LSPConnector implements CompletionHandler . ICompletionItemsConnector {
27
+ export class LSPConnector
28
+ implements CompletionHandler . ICompletionItemsConnector {
29
29
isDisposed = false ;
30
30
private _editor : CodeEditor . IEditor ;
31
31
private _connections : Map < VirtualDocument . id_path , LSPConnection > ;
@@ -172,7 +172,9 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
172
172
position_in_token
173
173
) . catch ( e => {
174
174
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 ) ;
176
178
} ) ;
177
179
} catch ( e ) {
178
180
console . warn ( 'LSP: kernel completions failed' , e ) ;
@@ -254,7 +256,7 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
254
256
// but it did not work for "from statistics <tab>" and lead to "from statisticsimport" (no space)
255
257
start : token . offset + ( all_non_prefixed ? 1 : 0 ) ,
256
258
end : token . offset + prefix . length ,
257
- items : items ,
259
+ items : items
258
260
} ;
259
261
}
260
262
@@ -305,7 +307,7 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
305
307
// For some reason the _jupyter_types_experimental list has two entries
306
308
// for each match, with one having a type of "<unknown>". Discard those
307
309
// and use undefined to indicate an unknown type.
308
- labelSet . has ( item . label ) // ||
310
+ labelSet . has ( item . label ) // ||
309
311
// (item.type && item.type === '<unknown>')
310
312
) {
311
313
return ;
@@ -318,9 +320,11 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
318
320
return { ...lsp , items : processedItems } ;
319
321
}
320
322
321
- list ( query : string | undefined ) : Promise < {
323
+ list (
324
+ query : string | undefined
325
+ ) : Promise < {
322
326
ids : CompletionHandler . IRequest [ ] ;
323
- values : CompletionHandler . ICompletionItemsReply [ ]
327
+ values : CompletionHandler . ICompletionItemsReply [ ] ;
324
328
} > {
325
329
return Promise . resolve ( undefined ) ;
326
330
}
@@ -334,7 +338,6 @@ export class LSPConnector implements CompletionHandler.ICompletionItemsConnector
334
338
save ( id : CompletionHandler . IRequest , value : void ) : Promise < any > {
335
339
return Promise . resolve ( undefined ) ;
336
340
}
337
-
338
341
}
339
342
340
343
/**
0 commit comments