-
Notifications
You must be signed in to change notification settings - Fork 287
Basic RST -> Markdown #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gatesn for getting this started. This is a huge improvement 💯
pyls/plugins/hover.py
Outdated
| return {'contents': _utils.format_docstring(definitions[0].docstring()) or ""} | ||
| md_docstring = _utils.format_docstring(definitions[0].docstring()) | ||
| return {'contents': { | ||
| 'type': lsp.MarkupKind.Markdown, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the spec the this should be 'kind': lsp.MarkupKind.Markdown instead of 'type': lsp.MarkupKind.Markdown since hover requests return a MarkupContent object:
export interface MarkupContent {
/**
* The type of the Markup
*/
kind: MarkupKind;
/**
* The content itself
*/
value: string;
}|
And that’ll be why I’ve seen no marked improvement in VSCode!! Thanks for pointing that out. I also note that docutils exists in Python, so we might want to make use of its RST parser instead of replicating the jacket typescript one in the VSCode plugin. |
…-server into ngates/markdown
Fixes #291