Skip to content

Commit bbbf06b

Browse files
committed
Fix instructions for .lsp_symlink workaround
1 parent 3d19714 commit bbbf06b

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,21 +164,25 @@ Use of a python `virtualenv` or a conda env is also recommended.
164164
or permanently by setting `c.Completer.use_jedi = False` in your
165165
[`ipython_config.py` file](https://ipython.readthedocs.io/en/stable/config/intro.html?highlight=ipython_config.py#systemwide-configuration).
166166

167-
1. (Optional, Linux/OSX-only) to enable opening files outside of the root
168-
directory (the place where you start JupyterLab), create `.lsp_symlink` and
169-
symlink your `/home`, or any other location which includes the files that you
170-
wish to make possible to open in there:
167+
1. (Optional; *nix-only) As a security measure Jupyter limits file access to the Jupyter root
168+
directory (the place where you launch the Jupyter server). Thus, in order to
169+
allow `jupyterlab-lsp` to navigate to external files such as packages
170+
installed system-wide or to libraries inside a virtual environment (`conda`,
171+
`pip`, ...) this access control mechanism needs to be circumvented: Inside your Jupyter
172+
root directory create a symlink named *.lsp_symlink* pointing to your system root */*.
171173

172-
```bash
173-
mkdir .lsp_symlink
174-
cd .lsp_symlink
175-
ln -s /home home
176-
```
174+
```
175+
ln -s / .lsp_symlink
176+
```
177+
178+
As this symlink is a hidden file the Jupyter server must be instructed to
179+
serve hidden files. Either use the appropriate commandline flag:
180+
181+
```
182+
jupyter lab --ContentsManager.allow_hidden=True
183+
```
177184
178-
If your user does not have sufficient permissions to traverse the entire path,
179-
you will not be able to open the file. A more detailed guide on symlinking
180-
(written for a related jupyterlab-go-to-definition extension) is available
181-
[here](https://github.com/krassowski/jupyterlab-go-to-definition/blob/master/README.md#which-directories-to-symlink).
185+
or, alternatively, set the corresponding setting inside your *jupyter_server_config.py*.
182186
183187
### Configuring the servers
184188

0 commit comments

Comments
 (0)