python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.95k stars 194 forks source link

Adding support for MarkdownClientCapabilities #509

Open MartinK07 opened 10 months ago

MartinK07 commented 10 months ago

With LSP 3.16 an option was introduced in which clients can specify the markdown parser that the server should use. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#markdownClientCapabilities

Having the option to specify the flavor of Markdown to generate would be a great way to resolve differences between GFM (GitHub Flavoured Markdown) and Python-Markdown.

This would likely resolve issues for currently broken rendering in LSP clients such as Sublime-LSP: https://github.com/python-lsp/docstring-to-markdown/issues/36

krassowski commented 10 months ago

I would be in favour of handling the MarkdownClientCapabilities and passing this info down to docstring-to-markdown (which would also need to be modified to accept these too); I am happy to help review PRs if anyone is interested in contributing this.