File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
packages/jupyterlab-lsp/src Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 3
3
### (unreleased)
4
4
5
5
- Add ability to deactivate Kernel completions or LSP completion through the settings.
6
+ - workaround url-parse issue causing problems when using JupyterLab 3.0.15 [ #599 ]
7
+
8
+ [ #599 ] : https://github.com/krassowski/jupyterlab-lsp/pull/599
6
9
7
10
### ` jupyter-lsp 1.2.0 ` (2021-04-26)
8
11
Original file line number Diff line number Diff line change @@ -359,9 +359,24 @@ export namespace DocumentConnectionManager {
359
359
throw `No language server installed for language ${ language } ` ;
360
360
}
361
361
362
+ // workaround url-parse bug(s) (see https://github.com/krassowski/jupyterlab-lsp/issues/595)
363
+ let documentUri = URLExt . join ( baseUri , virtual_document . uri ) ;
364
+ if (
365
+ ! documentUri . startsWith ( 'file:///' ) &&
366
+ documentUri . startsWith ( 'file://' )
367
+ ) {
368
+ documentUri = documentUri . replace ( 'file://' , 'file:///' ) ;
369
+ if (
370
+ documentUri . startsWith ( 'file:///users/' ) &&
371
+ baseUri . startsWith ( 'file:///Users/' )
372
+ ) {
373
+ documentUri = documentUri . replace ( 'file:///users/' , 'file:///Users/' ) ;
374
+ }
375
+ }
376
+
362
377
return {
363
378
base : baseUri ,
364
- document : URLExt . join ( baseUri , virtual_document . uri ) ,
379
+ document : documentUri ,
365
380
server : URLExt . join ( 'ws://jupyter-lsp' , language ) ,
366
381
socket : URLExt . join (
367
382
wsBase ,
You can’t perform that action at this time.
0 commit comments