Include sortText in completions and improve suggestions (#2332)
* sort completions * add an example * Include fuzzy scores in completions sort text * hlints * Extend completion documentation to inform whether an identifier is alreaady imported * Ditch alphabetical ordering - it's incompatible with qualified completions * Fix bugs in completion help text This fixes the ugly "Imported from 'Just B'" and other inconsistencies * added tests for qualified completions * Fix redundant import * Inline Fuzzy.match to apply [1] and to be case-sensitive on first match [1] - https://github.com/joom/fuzzy/pull/4 * fixup! Fix bugs in completion help text * Sort qualified completions first * Filter out global suggestions that overlap with local For example, don't suggest GHC.Exts.fromList when Data.Map.fromList is in scope alraedy * Sort completions alphabetically * Show provenance in detail text * Sort local/in-scope completions first * Fix build with GHC 9 * Ignore func symbol tests Co-authored-by:Alex Naspo <alex.naspo@protonmail.com> Co-authored-by:
Javier Neira <atreyu.bbb@gmail.com>
Showing
- ghcide/src/Development/IDE/GHC/Compat/Core.hs 16 additions, 4 deletionsghcide/src/Development/IDE/GHC/Compat/Core.hs
- ghcide/src/Development/IDE/Plugin/Completions.hs 38 additions, 4 deletionsghcide/src/Development/IDE/Plugin/Completions.hs
- ghcide/src/Development/IDE/Plugin/Completions/Logic.hs 141 additions, 57 deletionsghcide/src/Development/IDE/Plugin/Completions/Logic.hs
- ghcide/src/Development/IDE/Plugin/Completions/Types.hs 7 additions, 1 deletionghcide/src/Development/IDE/Plugin/Completions/Types.hs
- ghcide/src/Text/Fuzzy/Parallel.hs 70 additions, 13 deletionsghcide/src/Text/Fuzzy/Parallel.hs
- ghcide/test/exe/Main.hs 49 additions, 18 deletionsghcide/test/exe/Main.hs
- test/functional/Main.hs 1 addition, 1 deletiontest/functional/Main.hs
Loading
Please register or sign in to comment