palantir / python-language-server

An implementation of the Language Server Protocol for Python
MIT License
2.61k stars 285 forks source link

pydoc rendering on datatip at ide-python with atom-ide-ui #291

Open dwSun opened 6 years ago

dwSun commented 6 years ago

37638320-2d413d24-2c47-11e8-8405-74d4654665c8

It looks that the pydoc was rendered as markdown. Can you fix it?

Owner of ide-python said:

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.

Also, here are issues related to this problem: https://github.com/lgeiger/ide-python/issues/95 https://github.com/facebook-atom/atom-ide-ui/issues/23

damieng commented 6 years ago

https://github.com/palantir/python-language-server/blob/6b37c8a3135757da072d083296a3e949963da18b/pyls/_utils.py#L92 would need to be improved to spot and correctly encode the right patterns. Would need to know what the various formats can look like.