[clangd] Rearrange type, returntype and parameters in hover card
authorKadir Cetinkaya <kadircet@google.com>
Mon, 13 Jan 2020 16:21:31 +0000 (17:21 +0100)
committerKadir Cetinkaya <kadircet@google.com>
Wed, 15 Jan 2020 14:55:46 +0000 (15:55 +0100)
commit44f9c7a820c1e5fb949f441214a46b13588ff51a
tree8a96652720559594addf7fc4dc5fcccf66be3534
parentd74a3d470c316f8fade90fe231fc0a51361c01e6
[clangd] Rearrange type, returntype and parameters in hover card

Summary:
Moves type/returntype into its own line as it is more readable in cases
where the type is long.

Also gives parameter lists a heading, `Parameters:` to make them stand out.

Leaves the `right arrow` instead of `Returns: ` before Return Type to make
output more symmetric.

```
function foo

Returns: ret_type
Parameters:
- int x
```

vs

```
function foo

🡺 ret_type
Parameters:
- int x
```

Reviewers: sammccall, ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72623
clang-tools-extra/clangd/Hover.cpp
clang-tools-extra/clangd/test/hover.test
clang-tools-extra/clangd/unittests/HoverTests.cpp