File tree 1 file changed +6
-4
lines changed
ghcide/src/Development/IDE/Plugin
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,7 @@ codeAction lsp state (TextDocumentIdentifier uri) _range CodeActionContext{_diag
108
108
[ mkCA title [x] edit
109
109
| x <- xs, (title, tedit) <- suggestAction exportsMap ideOptions parsedModule text x
110
110
, let edit = WorkspaceEdit (Just $ Map. singleton uri $ List tedit) Nothing
111
- ] <> caRemoveInvalidExports parsedModule text diag xs uri
112
- <> caRemoveRedundantImports parsedModule text diag xs uri
113
-
111
+ ]
114
112
actions' =
115
113
[mkCA title [x] edit
116
114
| x <- xs
@@ -120,7 +118,11 @@ codeAction lsp state (TextDocumentIdentifier uri) _range CodeActionContext{_diag
120
118
, let edit = either error id $
121
119
rewriteToEdit dynflags uri (annsA ps) graft
122
120
]
123
- pure $ Right $ actions' <> actions
121
+ actions'' = caRemoveRedundantImports parsedModule text diag xs uri
122
+ <> actions
123
+ <> actions'
124
+ <> caRemoveInvalidExports parsedModule text diag xs uri
125
+ pure $ Right actions''
124
126
125
127
mkCA :: T. Text -> [Diagnostic ] -> WorkspaceEdit -> CAResult
126
128
mkCA title diags edit =
You can’t perform that action at this time.
0 commit comments