<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
Hi Sam!<br>
I think completing macros is useful so I would say A would not be good. I think B sounds good for the short/medium term. I’d like to eventually come up with a proposal of what to truncate, because I see results that are every unlikely to match the user intention.
 For example, not showing strtod and CLONE_CHILD_SETTID. But I don’t know enough about how this is implemented to make a concrete proposal.<br>
<br>
Cheers,<br>
Marc-André
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> clangd-dev <clangd-dev-bounces@lists.llvm.org> on behalf of Sam McCall via clangd-dev <clangd-dev@lists.llvm.org><br>
<b>Sent:</b> Friday, June 8, 2018 6:21:58 AM<br>
<b>To:</b> clangd-dev@lists.llvm.org<br>
<b>Subject:</b> [clangd-dev] Completion list spam and macros</font>
<div> </div>
</div>
<meta content="text/html; charset=utf-8">
<div>
<div dir="ltr">So code completion has lots of irrelevant results :-)<br>
<div><br>
</div>
<div>Macros seem to be the worst offenders. We're doing a better job of downranking them, but it still means that the result list is *always* long:</div>
<div>  <a href="https://i.imgur.com/gRZl0PZ.png">https://i.imgur.com/gRZl0PZ.png</a></div>
<div>We currently don't index macros and I'm scared that doing so would make this problem worse.</div>
<div><br>
</div>
<div>What do people think about these ideas (not alternatives, we could try several):</div>
<div>A) not completing macros at all, ever</div>
<div>B) completing macros only for case-insensitive prefix matches (not fuzzy)</div>
<div>C) tightening the word segmentation aspects of fuzzy matching (for all symbols) so this stuff doesn't match</div>
<div>D) tightening the case-matching aspects of fuzzy matching (for all symbols) so this stuff doesn't match</div>
<div>E) trying to identify the boundary between goodish results and bad results, and truncating the list there? (This will require disabling client-side filtering)</div>
<div>F) ignoring this problem as long as good results aren't being buried under the bad ones?</div>
<div><br>
</div>
<div>(I'll send a patch shortly for B which seems like an easy win to me, please try it out and we can revert if it's terrible)</div>
</div>
</div>
</body>
</html>