File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed
packages/jupyterlab-lsp/src/adapters/jupyterlab/components Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 4040 - completion now work properly when the kernel is shut down (
4141 [ #146 ] ( https://github.com/krassowski/jupyterlab-lsp/pull/146 )
4242 )
43+ - a lowercase completion option selected from an uppercase token
44+ will now correctly substitute the incomplete token (
45+ [ #143 ] ( https://github.com/krassowski/jupyterlab-lsp/pull/143 )
46+ )
4347
4448## ` lsp-ws-connection 0.3.0 `
4549
Original file line number Diff line number Diff line change @@ -50,6 +50,15 @@ Autocompletes If Only One Option
5050 Wait Until Keyword Succeeds 20x 0.5s Cell Editor Should Equal 3 list.clear
5151 [Teardown] Clean Up After Working With File Completion.ipynb
5252
53+ User Can Select Lowercase After Starting Uppercase
54+ Setup Notebook Python Completion.ipynb
55+ Enter Cell Editor 4 line=1
56+ Trigger Completer
57+ Completer Should Suggest time
58+ Press Keys None ENTER
59+ Wait Until Keyword Succeeds 20x 0.5s Cell Editor Should Equal 4 from time import time
60+ [Teardown] Clean Up After Working With File Completion.ipynb
61+
5362*** Keywords ***
5463Enter Cell Editor
5564 [Arguments] ${cell_nr } ${line } =1
Original file line number Diff line number Diff line change 2727 "source" : [
2828 " list."
2929 ]
30+ },
31+ {
32+ "cell_type" : " code" ,
33+ "execution_count" : null ,
34+ "metadata" : {},
35+ "outputs" : [],
36+ "source" : [
37+ " from time import Tim"
38+ ]
3039 }
3140 ],
3241 "metadata" : {
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ export class LSPConnector extends DataConnector<
218218 // sortText: "amean"
219219 let text = match . insertText ? match . insertText : match . label ;
220220
221- if ( text . startsWith ( token . value ) ) {
221+ if ( text . toLowerCase ( ) . startsWith ( token . value . toLowerCase ( ) ) ) {
222222 all_non_prefixed = false ;
223223 }
224224
@@ -282,7 +282,7 @@ export class LSPConnector extends DataConnector<
282282 if ( lsp . start > kernel . start ) {
283283 const cursor = editor . getCursorPosition ( ) ;
284284 const line = editor . getLine ( cursor . line ) ;
285- prefix = line . substring ( kernel . start , kernel . end ) ;
285+ prefix = line . substring ( cursor . column - 1 , cursor . column ) ;
286286 console . log ( 'will remove prefix from kernel response:' , prefix ) ;
287287 }
288288
You can’t perform that action at this time.
0 commit comments