[clangd-dev] Completion list spam and macros

Sam McCall via clangd-dev clangd-dev at lists.llvm.org
Fri Jun 8 03:21:58 PDT 2018


So code completion has lots of irrelevant results :-)

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:
  https://i.imgur.com/gRZl0PZ.png
We currently don't index macros and I'm scared that doing so would make
this problem worse.

What do people think about these ideas (not alternatives, we could try
several):
A) not completing macros at all, ever
B) completing macros only for case-insensitive prefix matches (not fuzzy)
C) tightening the word segmentation aspects of fuzzy matching (for all
symbols) so this stuff doesn't match
D) tightening the case-matching aspects of fuzzy matching (for all symbols)
so this stuff doesn't match
E) trying to identify the boundary between goodish results and bad results,
and truncating the list there? (This will require disabling client-side
filtering)
F) ignoring this problem as long as good results aren't being buried under
the bad ones?

(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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/clangd-dev/attachments/20180608/a4d3dcf0/attachment.html>


More information about the clangd-dev mailing list