You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We plan to provide a configuration GUI at some time ([#25](https://github.com/krassowski/jupyterlab-lsp/issues/25)), but in the meantime, you can use the instructions for the specific servers as described on their websites (see the table in [LANGUAGESERVERS.md](./LANGUAGESERVERS.md) for links).
162
162
163
-
Question: using rename feature for Python does not work, the statusbar displays `Rename failed: Error: IndexError: list index out of range`
163
+
#### I want to hide specific diagnostics/inspections/warnings
164
164
165
-
Answer: this is a pyls-specific error which happens when there is a syntax error and rope (the package used by pyls to perform edits) cannot parse the Python file.
165
+
For example, the Python server that we support by default ([pyls](https://github.com/palantir/python-language-server)) has a [configuration section](https://github.com/palantir/python-language-server#configuration) in ther documentation which refers to the providers of specific features, including `pycodestyle` for inspections/diagnostics.
166
166
167
-
Solution: Fix (or comment out) the fragments with syntax errors as indicated by diagnostics feature first, and try again.
167
+
The exact configuration details will vary between operating systems (please see the [configuration section of pycodestyle documentation](https://pycodestyle.readthedocs.io/en/latest/intro.html#configuration)), but as an example, on Linux you would simply need to create a file called `~/.config/pycodestyle`, which may look like that:
168
+
169
+
```cfg
170
+
[pycodestyle]
171
+
ignore = E402, E703
172
+
max-line-length = 120
173
+
```
174
+
175
+
In the example above:
176
+
177
+
- ignoring E402 allows imports which are not on the very top of the file,
178
+
- ignoring E703 allows terminating semicolon (useful for matplotlib plots),
179
+
- the maximal allowed line length is increased to 120.
180
+
181
+
After changing the configuration you may need to restart the JupyterLab, and please be advised that the errors in configuration may prevent the servers from functioning properly.
182
+
183
+
Again, please do check the pycodestyle documentation for specific error codes, and check the configuration of other feature providers and language servers as needed.
0 commit comments