rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.29k stars 1.61k forks source link

LSP: Return appropriate markdown content #4326

Open kjeremy opened 4 years ago

kjeremy commented 4 years ago

If HoverClientCapabilities.contentFormat or CompletionClientCapabilities.completionItem.documentationFormat or SignatureHelpClientCapabilities.signatureInformation.documentationFormat are absent then we need to return:

Request Return
Hover MarkedString
Completion string
SignatureHelp string

See: https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#textDocument_hover

kjeremy commented 4 years ago

This is part of #144

kjeremy commented 4 years ago

User report in the wild: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/MarkupKind/near/201324222