atom-community / ide-python

Python language support for Atom-IDE :atom: :snake:
https://atom.io/packages/ide-python
Other
236 stars 39 forks source link

pydoc rendering #95

Open dwSun opened 6 years ago

dwSun commented 6 years ago

It looks that the pydoc was rendered as markdown. Can you fix it? 2018-03-20 13-54-46

lgeiger commented 6 years ago

I'm afraid this requires some upstream fixes in either the python language server or the protocol specifications.

The problem is that the LSP currently only supports markdown or plain text. Since Python docstrings are usually written in rst the language server would need to convert it to markdown first. Ideally this could also be handled by the frontend but this also requires (small) changes to the protocol itself.

Do you want to open a issue on the python-language-server repo to see if we can find a fesible way of doing a conversion without losing too much speed?

Evpok commented 6 years ago

In the meantime, you can wrap doctests in fenced code blocks to avoid having theme rendered as Markdown blockquotes

```
>>> list(range(10))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
```
dwSun commented 6 years ago

Started a new issue on the python-language-server repo.

Here is the issue related to this problem on the atom-ide-ui repo: https://github.com/facebook-atom/atom-ide-ui/issues/23

lgeiger commented 6 years ago

For reference checkout https://github.com/palantir/python-language-server/pull/348 which will fix this problem in a future release of pyls.