-
Notifications
You must be signed in to change notification settings - Fork 19k
x/tools/gopls: support for comment rendering #64936
Copy link
Copy link
Open
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I propose adding a gopls command that uses
doc/commentto render documentation comments of package-level declarations. The intent is that this command would be used by a development environment to render pkgsite-style documentation for workspace packages. This could serve the following purposes:I'll grant the first three items can be achieved by running
pkgsitelocally, but that does not address (4), it is less than convenient, and in my experience does not work well for (3).I propose:
gopls/internal/lsp/cache/docs, which will locate documentation comments, parse them withdoc/comment.Parser, and convert thedoc/comment.Docinto marshallable types such that the result can be cached.gopls/internal/lsp/command.Interface.RenderDocs, which will retrievedoc/comment.Docs from a snapshot and render them:CC @hyangah @adonovan