Skip to content
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

Use markdown to render docs (when doing hover) #2451

Open
DylanGuedes opened this issue Sep 13, 2022 · 1 comment
Open

Use markdown to render docs (when doing hover) #2451

DylanGuedes opened this issue Sep 13, 2022 · 1 comment

Comments

@DylanGuedes
Copy link

DylanGuedes commented Sep 13, 2022

Is your feature request related to a problem? Please describe.
If you use special characters to document something on your Go code (ex: this, or this), no special rendering is done for it. Similar to what microsoft/vscode-cpptools#6020 reports for the C++ integration.
Ex:

Describe the solution you'd like
A new configuration that would enable markdown rendering for a go project docstring, but just for the one shown when hovering.

Describe alternatives you've considered
Rendering using other formats or just having special cases for `` and ** without necessarily adding full markdown support.

Additional context

@findleyr
Copy link
Member

VS Code implements formatting of doc comments as defined by https://tip.golang.org/doc/comment#syntax.

Comments need to be consumed by more tools than just the editor, and as such we don't want to diverge from the minimal support for rich content outlined in the official documentation.

If we theoretically supported additional aspects of markdown, we'd need to maintain a fork of https://pkg.go.dev/go/doc/comment, and would be encouraging comments to diverge from the spec. There is a long history here, and the new spec was carefully chosen to balance richness and simplicity (see https://go.dev/issue/51082).

All this to say I think it is unlikely that we would do this, sorry.

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

No branches or pull requests

3 participants