We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b440621 commit c7e05f7Copy full SHA for c7e05f7
ghcide/src/Development/IDE/Plugin/CodeAction.hs
@@ -1186,7 +1186,7 @@ suggestNewImport packageExportsMap ps@(L _ HsModule {..}) Diagnostic{_message}
1186
, Just (range, indent) <- newImportInsertRange ps
1187
, extendImportSuggestions <- matchRegexUnifySpaces msg
1188
"Perhaps you want to add ‘[^’]*’ to the import list in the import of ‘([^’]*)’"
1189
- = [(imp, TextEdit range (imp <> "\n" <> T.replicate indent " "))
+ = sortOn fst [(imp, TextEdit range (imp <> "\n" <> T.replicate indent " "))
1190
| (unNewImport -> imp) <- constructNewImportSuggestions packageExportsMap (qual <|> qual', thingMissing) extendImportSuggestions
1191
]
1192
suggestNewImport _ _ _ = []
0 commit comments