[PATCH] D71555: [clangd] Refurbish HoverInfo::present

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 01:33:00 PST 2020


sammccall accepted this revision.
sammccall added a comment.

still LG, go ahead and we can iterate



================
Comment at: clang-tools-extra/clangd/Hover.cpp:495
+    markup::Paragraph &P = Output.addParagraph();
+    P.appendText("Value: ");
+    P.appendCode(*Value);
----------------
kadircet wrote:
> sammccall wrote:
> > consider "Value = " or even just "= "
> sorry somehow missed that one.
> 
> what about putting that into header part with something like:
> 
> ```
> variable `var` : `int`(=3)
> 
> function `foo` -> `int`(=3)
> ```
> 
> we can also drop equals signs, I am not sure if it looks confusing without those.
I'm not sure if this is a good idea as all of name, type, and value can be long. If we overrun and end up wrapping, I think it's less clear than a separate paragraph.

That said if you do go this way, I'd vote to keep the = and drop the (), I think that's clear and terse


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71555





More information about the cfe-commits mailing list