Skip to content

Markdown and plaintext order is suboptimal in documentationFormat and contentFormat #36

@krassowski

Description

@krassowski

This package can parse Markdown in hover/completion/signature:

if (contents.kind === "markdown") {
value = marked.parse(value);
}

Yet, it requests plaintext over markdown in all the cases:

documentationFormat: ["plaintext", "markdown"],

documentationFormat: ["plaintext", "markdown"],

contentFormat: ["plaintext", "markdown"],

which leads to sub-optimal user experience when used with servers complying with LSP specification which says:

The order describes the preferred format of the client

for each of these, e.g. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionClientCapabilities

This is because servers will correctly return plaintext response in these cases. Moreover, plain text is not being correctly escaped resulting in jumbled up text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions