[clangd] Show documentation in hover, and fetch docs from index if needed.
authorSam McCall <sam.mccall@gmail.com>
Tue, 9 Jul 2019 17:59:50 +0000 (17:59 +0000)
committerSam McCall <sam.mccall@gmail.com>
Tue, 9 Jul 2019 17:59:50 +0000 (17:59 +0000)
commit5a458d6ada3ba7341c8c34560f7de9bb74725ad0
tree85659fc33617e7f0d3ac027e603989002a7f7018
parent077df019184b9dcbc80a73c12c6bcfae1529db98
[clangd] Show documentation in hover, and fetch docs from index if needed.

Summary:
I assume showing docs is going to be part of structured hover rendering, but
it's unclear whether that's going to make clangd 9 so this is low-hanging fruit.

(Also fixes a bug uncovered in FormattedString's plain text output: need blank
lines when text follows codeblocks)

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64296

llvm-svn: 365522
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/FormattedString.cpp
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/XRefs.h
clang-tools-extra/clangd/unittests/FormattedStringTests.cpp
clang-tools-extra/clangd/unittests/XRefsTests.cpp