[PATCH] D35894: [clangd] Code hover for Clangd
William Enright via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 23 08:17:05 PDT 2017
Nebiroth added a comment.
In https://reviews.llvm.org/D35894#903594, @ilya-biryukov wrote:
> In https://reviews.llvm.org/D35894#903552, @malaperle wrote:
>
> > I think he meant to have multiple sections in the hover, one C/C++ and one not. But we noticed you can have an array of MarkedString in Hover so it should be fine.
>
>
> I totally misunderstood the question. Good to know it all works without changing the LSP.
> Just to make sure I got it right this time: the use-case is to, e.g., return both a code snippet (having `"language": cpp`) and a documentation string (without `language`) as a result of hover request?
That's about it.
I'm sitting on a code hover patch that does more or less what you just described. One MarkedString with it's language field set to "C++" returns the appropriate code snippet for the code hover and another MarkedString with it's language field set to "markdown" returns the associated scope.
https://reviews.llvm.org/D35894
More information about the cfe-commits
mailing list