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 33### (unreleased)
44
55- 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
69
710### ` jupyter-lsp 1.2.0 ` (2021-04-26)
811
Original file line number Diff line number Diff line change @@ -359,9 +359,24 @@ export namespace DocumentConnectionManager {
359359 throw `No language server installed for language ${ language } ` ;
360360 }
361361
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+
362377 return {
363378 base : baseUri ,
364- document : URLExt . join ( baseUri , virtual_document . uri ) ,
379+ document : documentUri ,
365380 server : URLExt . join ( 'ws://jupyter-lsp' , language ) ,
366381 socket : URLExt . join (
367382 wsBase ,
You can’t perform that action at this time.
0 commit comments