You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trigger extending import only when the item is not in scope (#1309)
* Trigger extending import only when it's not in scope
* Extract GlobalRdrElts before getting into the producer
* Fix macros
* Compare only elements' name
* Rollback due to performance
JustCompletionItem{..} -> liftIO . assertBool ("Expected no command but got: "<>show _command) $null _command
3475
+
3476
+
3457
3477
topLevelCompletionTests:: [TestTree]
3458
3478
topLevelCompletionTests = [
3459
3479
completionTest
@@ -3674,18 +3694,21 @@ nonLocalCompletionTests =
3674
3694
(Position24)
3675
3695
"ZeroPad"
3676
3696
["module A where", "import Text.Printf (FormatAdjustment (ZeroPad))", "ZeroPad"]
3677
-
, completionCommandTest
3697
+
, completionNoCommandTest
3678
3698
"parent imported all"
3679
3699
["module A where", "import Text.Printf (FormatAdjustment (..))", "ZeroPad"]
3680
3700
(Position24)
3681
3701
"ZeroPad"
3682
-
["module A where", "import Text.Printf (FormatAdjustment (..))", "ZeroPad"]
3683
-
, completionCommandTest
3702
+
, completionNoCommandTest
3684
3703
"already imported"
3685
3704
["module A where", "import Text.Printf (FormatAdjustment (ZeroPad))", "ZeroPad"]
3686
3705
(Position24)
3687
-
"ZeroPad"
3688
-
["module A where", "import Text.Printf (FormatAdjustment (ZeroPad))", "ZeroPad"]
3706
+
"ZeroPad"
3707
+
, completionNoCommandTest
3708
+
"function from Prelude"
3709
+
["module A where", "import Data.Maybe ()", "Nothing"]
3710
+
(Position24)
3711
+
"Nothing"
3689
3712
]
3690
3713
, testGroup "Record completion"
3691
3714
[ completionCommandTest
@@ -3700,12 +3723,11 @@ nonLocalCompletionTests =
3700
3723
(Position210)
3701
3724
"FormatParse {"
3702
3725
["module A where", "import Text.Printf (FormatParse (FormatParse))", "FormatParse"]
3703
-
, completionCommandTest
3726
+
, completionNoCommandTest
3704
3727
"already imported"
3705
3728
["module A where", "import Text.Printf (FormatParse (FormatParse))", "FormatParse"]
3706
3729
(Position210)
3707
3730
"FormatParse {"
3708
-
["module A where", "import Text.Printf (FormatParse (FormatParse))", "FormatParse"]
3709
3731
]
3710
3732
],
3711
3733
-- we need this test to make sure the ghcide completions module does not return completions for language pragmas. this functionality is turned on in hls
0 commit comments