File tree Expand file tree Collapse file tree 2 files changed +1
-6
lines changed
plugins/hls-cabal-plugin/src/Ide/Plugin Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ cabalAddCodeAction recorder state plId (CodeActionParams _ _ (TextDocumentIdenti
344
344
Just haskellFilePath -> do
345
345
mbCabalFile <- liftIO $ CabalAdd. findResponsibleCabalFile haskellFilePath
346
346
case mbCabalFile of
347
- Nothing -> pure $ InL [InR noCabalFileAction ]
347
+ Nothing -> pure $ InL []
348
348
Just cabalFilePath -> do
349
349
verTxtDocId <- lift $ pluginGetVersionedTextDoc $ TextDocumentIdentifier (filePathToUri cabalFilePath)
350
350
mbGPD <- liftIO $ runAction " cabal.cabal-add" state $ useWithStale ParseCabalFile $ toNormalizedFilePath cabalFilePath
@@ -356,8 +356,6 @@ cabalAddCodeAction recorder state plId (CodeActionParams _ _ (TextDocumentIdenti
356
356
haskellFilePath cabalFilePath gpd
357
357
pure $ InL $ fmap InR actions
358
358
where
359
- noCabalFileAction = CodeAction " No .cabal file found" (Just CodeActionKind_QuickFix ) (Just [] ) Nothing
360
- (Just (CodeActionDisabled " No .cabal file found" )) Nothing Nothing Nothing
361
359
cabalAddRecorder = cmapWithPrio LogCabalAdd recorder
362
360
363
361
Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ import Text.Regex.TDFA
85
85
86
86
data Log
87
87
= LogFoundResponsibleCabalFile FilePath
88
- | LogCalledCabalAddCodeAction
89
88
| LogCalledCabalAddCommand CabalAddCommandParams
90
89
| LogCreatedEdit WorkspaceEdit
91
90
| LogExecutedCommand
@@ -94,7 +93,6 @@ data Log
94
93
instance Pretty Log where
95
94
pretty = \ case
96
95
LogFoundResponsibleCabalFile fp -> " Located the responsible cabal file at " <+> pretty fp
97
- LogCalledCabalAddCodeAction -> " The CabalAdd CodeAction is called"
98
96
LogCalledCabalAddCommand params -> " Called CabalAdd command with:\n " <+> pretty params
99
97
LogCreatedEdit edit -> " Created inplace edit:\n " <+> pretty edit
100
98
LogExecutedCommand -> " Executed CabalAdd command"
@@ -143,7 +141,6 @@ addDependencySuggestCodeAction
143
141
-> IO [CodeAction ]
144
142
addDependencySuggestCodeAction recorder plId verTxtDocId suggestions haskellFilePath cabalFilePath gpd = do
145
143
buildTargets <- liftIO $ getBuildTargets gpd cabalFilePath haskellFilePath
146
- logWith recorder Info LogCalledCabalAddCodeAction
147
144
case buildTargets of
148
145
[] -> pure $ mkCodeAction cabalFilePath Nothing <$> suggestions
149
146
targets -> pure $ concat [mkCodeAction cabalFilePath (Just $ buildTargetToStringRepr target) <$>
You can’t perform that action at this time.
0 commit comments