vscode-go icon indicating copy to clipboard operation
vscode-go copied to clipboard

Use markdown to render docs (when doing hover)

Open DylanGuedes opened this issue 3 years ago • 1 comments

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 https://github.com/microsoft/vscode-cpptools/issues/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

DylanGuedes avatar Sep 13 '22 10:09 DylanGuedes

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.

findleyr avatar Sep 16 '22 18:09 findleyr