@@ -164,21 +164,28 @@ Use of a python `virtualenv` or a conda env is also recommended.
164
164
or permanently by setting ` c.Completer.use_jedi = False ` in your
165
165
[ ` ipython_config.py ` file] ( https://ipython.readthedocs.io/en/stable/config/intro.html?highlight=ipython_config.py#systemwide-configuration ) .
166
166
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, Linux/OSX-only) As a security measure by default Jupyter server only allows
168
+ access to files under the Jupyter root directory (the place where you launch the Jupyter server).
169
+ Thus, in order to 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 ` / ` .
171
173
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 command line flag:
180
+
181
+ ```
182
+ jupyter lab --ContentsManager.allow_hidden=True
183
+ ```
184
+
185
+ or, alternatively, set the corresponding setting inside your ` jupyter_server_config.py ` .
177
186
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 ) .
187
+ Help in implementing a custom [ ` ContentsManager ` ] ( https://github.com/jupyter-lsp/jupyterlab-lsp/issues/850 )
188
+ which will enable navigating to external files without the symlink is welcome.
182
189
183
190
### Configuring the servers
184
191
0 commit comments