Skip to content

Commit ccf5b9b

Browse files
authored
Update README.md
Closes #171 and fixes #128
1 parent fc1b0a4 commit ccf5b9b

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,28 @@ extension name, like this:
156156
jupyter labextension install @krassowski/[email protected]
157157
```
158158

159-
### Troubleshooting
159+
### Configuring the servers
160160

161-
#### Rename fails with `IndexError`
161+
#### I want do hide specific diagnostics/inspections/warnings
162162

163-
Question: using rename feature for Python does not work, the statusbar displays `Rename failed: Error: IndexError: list index out of range`
163+
We plan to provide a configuration GUI at some time, 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).
164164

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+
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+
[pycodestyle]
170+
ignore = E402, E703
171+
max-line-length = 120
172+
```
173+
174+
In the example above:
175+
- ignoring E402 allows imports which are not on the very top of the file,
176+
- ignoring E703 allows terminating semicolon (useful for matplotlib plots),
177+
- the maximal allowed line length is increased to 120.
178+
179+
Again, please do check the pycodestyle documentation for specific error codes, and check configuration of other feature providers and language servers as needed.
166180

167-
Solution: Fix (or comment out) the fragments with syntax errors as indicated by diagnostics feature first, and try again.
168181

169182
## Acknowledgements
170183

0 commit comments

Comments
 (0)