[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 14 08:23:01 PDT 2018
ioeric added inline comments.
================
Comment at: clangd/CodeComplete.cpp:278
+ if (AllowIndexCompletion)
+ I.label = (InsertingInclude ? "+" : " ") + I.label;
I.scoreInfo = Scores;
----------------
sammccall wrote:
> I think we should avoid tokens that occur commonly in C++ (possibly with the exception of # which is used for this purpose. We should also avoid doublewide chars because of alignment (even assuming a monospace font is risky...)
>
> Ideas:
> - something like "external link" icon on wikipedia - but no such thing in unicode :-(🔗(U+1F517 link) looks truly terrible in at least some fonts
> - variant on plus like ⊕ (U+2295 circled plus) - can't find one I like a lot
> - some kind of arrow like ☇ (U+2607 lightning) or ⇱ (U+21F1 north west arrow to corner) or ⮣ (upwards triangle-headed arrow with long head rightwards)
> - variant on hash like ﹟(U+FE5F small number sign)
> - something unrelated but "special" like ※ (U+203B reference mark)
>
> I'm not really happy with any of these :-(
Thanks for the suggestions!
After playing around with different options, we decided to go with `•` which is simple and also aligns well in vim and vscode. We tried to avoid symbols that are meaningful/complicated because they tend to add noise when users are used to the existence of the icon, and they appear less elegant when there are a whole list of indicators in the completion results.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48163
More information about the cfe-commits
mailing list