@@ -21,7 +21,8 @@ import Data.List.Extra as List hiding
2121import qualified Data.Map as Map
2222
2323import Data.Maybe (catMaybes , fromMaybe ,
24- isJust , mapMaybe , listToMaybe )
24+ isJust , listToMaybe ,
25+ mapMaybe )
2526import qualified Data.Text as T
2627import qualified Text.Fuzzy.Parallel as Fuzzy
2728
@@ -637,7 +638,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls,
637638 -- Completions can return more information that just the completion itself, but it will
638639 -- require more than what GHC currently gives us in the HieAST, since it only gives the Type
639640 -- of the fields, not where they are defined, etc. So for now the extra fields remain empty.
640- -- Also: additionalTextEdits is a todo, since we may want to import the record. It requires a way
641+ -- Also: additionalTextEdits is a todo, since we may want to import the record. It requires a way
641642 -- to get the record's module, which isn't included in the type information used to get the fields.
642643 dotFieldSelectorToCompl :: T. Text -> T. Text -> (Bool , CompItem )
643644 dotFieldSelectorToCompl recname label = (True , CI
@@ -678,7 +679,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls,
678679 ty = showForSnippet <$> typ
679680 thisModName = Local $ nameSrcSpan name
680681
681- -- When record-dot-syntax completions are available, we return them exclusively.
682+ -- When record-dot-syntax completions are available, we return them exclusively.
682683 -- They are only available when we write i.e. `myrecord.` with OverloadedRecordDot enabled.
683684 -- Anything that isn't a field is invalid, so those completion don't make sense.
684685 compls
@@ -744,6 +745,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls,
744745
745746
746747
748+
747749uniqueCompl :: CompItem -> CompItem -> Ordering
748750uniqueCompl candidate unique =
749751 case compare (label candidate, compKind candidate)
0 commit comments