lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

Unexpected workspace symbol search results

Open Kha opened this issue 3 years ago • 3 comments

Gonna use this issue to collect a few unexpected results I've encountered

  • searching for smap or SMap does not find the actual type

Kha avatar Aug 30 '22 08:08 Kha

See also #1510.

gebner avatar Aug 30 '22 18:08 gebner

I can take this one on. My investigation thus far shows that there may be a bug or some score weighting tweaking necessary in fuzzyMatchCore. If you add

  for ((name, score), _) in symbols.qsort (fun ((_, s1), _) ((_, s2), _) => s1 > s2) do
    dbg_trace s!"{name}: {score}"

to handleWorkspaceSymbol to print out the results in order of score, you'll find that when you query by SMap, the symbol Lean.SMap is there, but its score is too low to show up in the top 100 results.

rish987 avatar Oct 07 '22 22:10 rish987

Nice, sounds like the right direction!

Kha avatar Oct 08 '22 08:10 Kha

We would probably expect matches with exact extract components to be at the top here? image

Kha avatar Nov 10 '22 09:11 Kha

(fun game: what's the shortest query to get me to Array.extract? aexr is pretty good!) edit: axt is probably optimal, though it's interesting that it wouldn't prioritize Array.ext

Kha avatar Nov 10 '22 09:11 Kha