[clangd-dev] Completion list spam and macros
Marc-André Laperle via clangd-dev
clangd-dev at lists.llvm.org
Mon Jun 11 06:32:10 PDT 2018
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.
From: clangd-dev <clangd-dev-bounces at lists.llvm.org> on behalf of Sam McCall via clangd-dev <clangd-dev at lists.llvm.org>
Sent: Friday, June 8, 2018 6:21:58 AM
To: clangd-dev at lists.llvm.org
Subject: [clangd-dev] Completion list spam and macros
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:
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...
More information about the clangd-dev