Skip to content

Commit 3a8105c

Browse files
committed
Special case for MacOS
1 parent cb1b908 commit 3a8105c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/jupyterlab-lsp/src/connection_manager.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,19 @@ export namespace DocumentConnectionManager {
359359
throw `No language server installed for language ${language}`;
360360
}
361361

362-
// workaround url-parse bug (see https://github.com/krassowski/jupyterlab-lsp/issues/595)
362+
// workaround url-parse bug(s) (see https://github.com/krassowski/jupyterlab-lsp/issues/595)
363363
let documentUri = URLExt.join(baseUri, virtual_document.uri);
364364
if (
365365
!documentUri.startsWith('file:///') &&
366366
documentUri.startsWith('file://')
367367
) {
368368
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+
}
369375
}
370376

371377
return {

0 commit comments

Comments
 (0)