Open findleyr opened 3 weeks ago
The 'Structured' hover kind does not serve human readable hover content. Rather, it serves JSON describing the hover. https://github.com/golang/tools/blob/master/gopls/doc/settings.md#hoverkind-enum
gopls should conform to the semantics of the LSP: hover is intended to be human readable. If we want to delegate hover presentation to the client, we must by definition have a thick client, in which case the client can just use a separate command via workspace/executeCommand. By analogy, tsserver has a command for structured hover info: https://github.com/microsoft/TypeScript/blob/55f1248a2052eebdea6bc0e2eef754df89a44bf7/src/server/protocol.ts#L2015.
workspace/executeCommand
CC @adonovan
I vaguely recall that the sole thick client of the Hover JSON output is one of the Vims. (The feature was added in the CL attached to #33352. Paging @myitcv for awareness.)
The 'Structured' hover kind does not serve human readable hover content. Rather, it serves JSON describing the hover. https://github.com/golang/tools/blob/master/gopls/doc/settings.md#hoverkind-enum
gopls should conform to the semantics of the LSP: hover is intended to be human readable. If we want to delegate hover presentation to the client, we must by definition have a thick client, in which case the client can just use a separate command via
workspace/executeCommand
. By analogy, tsserver has a command for structured hover info: https://github.com/microsoft/TypeScript/blob/55f1248a2052eebdea6bc0e2eef754df89a44bf7/src/server/protocol.ts#L2015.CC @adonovan