[PATCH] D72623: [clangd] Rearrange type, returntype and parameters in hover card

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 14 02:28:14 PST 2020


sammccall accepted this revision.
sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/Hover.cpp:567
+  } else if (Type) {
+    Output.addParagraph().appendText("Type: ").appendCode(*Type);
   }
----------------
kadircet wrote:
> sammccall wrote:
> > consider **`∈`**, which would be short and symmetrical with the arrow for return type...
> > 
> > Too obscure?
> it is a good way to make the output shorter, not sure about the symmetry though as type and returntype never show up in the same hovercard.
> but I believe it is too obscure.
The symmetry I mean is two kinds of hover cards for functions vs values that when scanned have approximately the same layout (type information is introduced by a similar-sized symbol) but can still be distinguished.

> but I believe it is too obscure.
:-( fair enough


================
Comment at: clang-tools-extra/clangd/Hover.cpp:538
 
   bool HasMiddleSection = false;
   // Put a linebreak after header to increase readability.
----------------
as discussed offline, better IMO to allow the middle section to be empty, emit both rulers, and fix it in post :-)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72623/new/

https://reviews.llvm.org/D72623





More information about the cfe-commits mailing list