@@ -21,7 +21,8 @@ import Data.List.Extra as List hiding
21
21
import qualified Data.Map as Map
22
22
23
23
import Data.Maybe (catMaybes , fromMaybe ,
24
- isJust , mapMaybe , listToMaybe )
24
+ isJust , listToMaybe ,
25
+ mapMaybe )
25
26
import qualified Data.Text as T
26
27
import qualified Text.Fuzzy.Parallel as Fuzzy
27
28
@@ -637,7 +638,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls,
637
638
-- Completions can return more information that just the completion itself, but it will
638
639
-- require more than what GHC currently gives us in the HieAST, since it only gives the Type
639
640
-- 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
641
642
-- to get the record's module, which isn't included in the type information used to get the fields.
642
643
dotFieldSelectorToCompl :: T. Text -> T. Text -> (Bool , CompItem )
643
644
dotFieldSelectorToCompl recname label = (True , CI
@@ -678,7 +679,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls,
678
679
ty = showForSnippet <$> typ
679
680
thisModName = Local $ nameSrcSpan name
680
681
681
- -- When record-dot-syntax completions are available, we return them exclusively.
682
+ -- When record-dot-syntax completions are available, we return them exclusively.
682
683
-- They are only available when we write i.e. `myrecord.` with OverloadedRecordDot enabled.
683
684
-- Anything that isn't a field is invalid, so those completion don't make sense.
684
685
compls
@@ -744,6 +745,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls,
744
745
745
746
746
747
748
+
747
749
uniqueCompl :: CompItem -> CompItem -> Ordering
748
750
uniqueCompl candidate unique =
749
751
case compare (label candidate, compKind candidate)
0 commit comments