8000 Basic RST -> Markdown by gatesn · Pull Request #348 · palantir/python-language-server · GitHub
[go: up one dir, main page]

Skip to content

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

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Basic RST -> Markdown #348

wants to merge 12 commits into from

Conversation

gatesn
Copy link
Contributor
@gatesn gatesn commented May 10, 2018

Fixes #291

Copy link
Contributor
@lgeiger lgeiger left a 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 💯

return {'contents': _utils.format_docstring(definitions[0].docstring()) or ""}
md_docstring = _utils.format_docstring(definitions[0].docstring())
return {'contents': {
'type': lsp.MarkupKind.Markdown,
Copy link
Contributor

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;
}

@gatesn
Copy link
Contributor Author
gatesn commented May 13, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0