Skip to content

Provide API to return formatted content from suggest and parameter hints #11877

@joaomoreno

Description

@joaomoreno

Take the following snippet:

/**
 * Some documentation is **nice**.
 * 
 * Example usage:
 * 
 * ```
 * function main() {
 *   return hello('world');
 * }
 * ```
 */
function hello(world: string): number {
    return 1337;
}

Here's how it looks in different widgets:

Hover

foo

Suggest

image

Parameter hints

image

Widgets look now somewhat aligned, since #2330. Their contents, on the other hand, could be a bit more.

Hover looks great, since at some point we provided the possibility of returning MarkedString through the API.

Both suggest and parameter hints lack that and look pretty pale in comparison.

We got to find a way to advance the API allowing users to return formatted content from certain API calls without bloating the API too much.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions