[PATCH] D44882: [clangd] Implementation of workspace/symbol request

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 27 02:39:30 PDT 2018


ilya-biryukov added a comment.

>>> - Current `fuzzyFind` implementation can only match qualifiers strictly (i.e. st::vector won't match std::vector). Should we look into allowing fuzzy matches for this feature?  (not in this patch, rather in the long term).
>> 
>> I'm not sure, I'm thinking there should be a balance between how fuzzy it it and how much noise it generates. Right now I find it a bit too fuzzy since when I type "Draft" (to find DraftMgr), it picks up things like DocumentRangeFormattingParams. Adding fuzziness to the namespace would make this worse. Maybe with improved scoring it won't matter too much? I'll try FuzzyMatcher and see.
> 
> +1, I think experience with `workspaceSymbols` will help us answer this question.

I was using an IDE that had fuzzy find for an equivalent of `workspaceSymbols` and found it to be an amazing experience. And having consistent behavior between different features is really nice.
Good ranking is a key to it being useful, though. If when typing `Draft` you get `DocumentRangeFormattingParams` ranked higher than `DraftMgr` that's a bug in FuzzyMatcher. If you have some not-very-nice results at the end of the list, this shouldn't be a problem in most cases.

I'm highly in favor of enabling fuzzy matching for `workspaceSymbols`.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44882





More information about the cfe-commits mailing list