@@ -50,7 +50,7 @@ instance Pretty Log where
5050 LogModificationTime nfp modTime ->
5151 " Modified:" <+> pretty (fromNormalizedFilePath nfp) <+> pretty (show modTime)
5252 LogDiagnostics nfp diags ->
53- " Diagnostics for " <+> pretty (fromNormalizedFilePath nfp) <> " :" <+> pretty (show diags)
53+ " Diagnostics for" <+> pretty (fromNormalizedFilePath nfp) <> " :" <+> pretty (show diags)
5454 LogDocOpened uri ->
5555 " Opened text document:" <+> pretty (getUri uri)
5656 LogDocModified uri ->
@@ -68,10 +68,10 @@ descriptor recorder plId = (defaultCabalPluginDescriptor plId)
6868 [ mkPluginNotificationHandler LSP. STextDocumentDidOpen $
6969 \ ide vfs _ (DidOpenTextDocumentParams TextDocumentItem {_uri,_version}) -> liftIO $ do
7070 whenUriFile _uri $ \ file -> do
71- log' Debug $ LogDocOpened _uri
72- join $ atomically $ Shake. recordDirtyKeys (shakeExtras ide) GetModificationTime [file]
73- restartShakeSession (shakeExtras ide) (VFSModified vfs) (fromNormalizedFilePath file ++ " (opened)" ) []
74- join $ Shake. shakeEnqueue (shakeExtras ide) $ Shake. mkDelayedAction " cabal parse modified" Info $ void $ use ParseCabal file
71+ log' Debug $ LogDocOpened _uri
72+ join $ atomically $ Shake. recordDirtyKeys (shakeExtras ide) GetModificationTime [file]
73+ restartShakeSession (shakeExtras ide) (VFSModified vfs) (fromNormalizedFilePath file ++ " (opened)" ) []
74+ join $ Shake. shakeEnqueue (shakeExtras ide) $ Shake. mkDelayedAction " cabal parse modified" Info $ void $ use ParseCabal file
7575
7676 , mkPluginNotificationHandler LSP. STextDocumentDidChange $
7777 \ ide vfs _ (DidChangeTextDocumentParams VersionedTextDocumentIdentifier {_uri} _) -> liftIO $ do
@@ -83,19 +83,19 @@ descriptor recorder plId = (defaultCabalPluginDescriptor plId)
8383
8484 , mkPluginNotificationHandler LSP. STextDocumentDidSave $
8585 \ ide vfs _ (DidSaveTextDocumentParams TextDocumentIdentifier {_uri} _) -> liftIO $ do
86- whenUriFile _uri $ \ file -> do
87- log' Debug $ LogDocSaved _uri
88- join $ atomically $ Shake. recordDirtyKeys (shakeExtras ide) GetModificationTime [file]
89- restartShakeSession (shakeExtras ide) (VFSModified vfs) (fromNormalizedFilePath file ++ " (saved)" ) []
90- join $ Shake. shakeEnqueue (shakeExtras ide) $ Shake. mkDelayedAction " cabal parse modified" Info $ void $ use ParseCabal file
86+ whenUriFile _uri $ \ file -> do
87+ log' Debug $ LogDocSaved _uri
88+ join $ atomically $ Shake. recordDirtyKeys (shakeExtras ide) GetModificationTime [file]
89+ restartShakeSession (shakeExtras ide) (VFSModified vfs) (fromNormalizedFilePath file ++ " (saved)" ) []
90+ join $ Shake. shakeEnqueue (shakeExtras ide) $ Shake. mkDelayedAction " cabal parse modified" Info $ void $ use ParseCabal file
9191
9292 , mkPluginNotificationHandler LSP. STextDocumentDidClose $
93- \ ide vfs _ (DidCloseTextDocumentParams TextDocumentIdentifier {_uri}) -> liftIO $ do
94- whenUriFile _uri $ \ file -> do
95- log' Debug $ LogDocClosed _uri
96- join $ atomically $ Shake. recordDirtyKeys (shakeExtras ide) GetModificationTime [file]
97- restartShakeSession (shakeExtras ide) (VFSModified vfs) (fromNormalizedFilePath file ++ " (closed)" ) []
98- join $ Shake. shakeEnqueue (shakeExtras ide) $ Shake. mkDelayedAction " cabal parse modified" Info $ void $ use ParseCabal file
93+ \ ide vfs _ (DidCloseTextDocumentParams TextDocumentIdentifier {_uri}) -> liftIO $ do
94+ whenUriFile _uri $ \ file -> do
95+ log' Debug $ LogDocClosed _uri
96+ join $ atomically $ Shake. recordDirtyKeys (shakeExtras ide) GetModificationTime [file]
97+ restartShakeSession (shakeExtras ide) (VFSModified vfs) (fromNormalizedFilePath file ++ " (closed)" ) []
98+ join $ Shake. shakeEnqueue (shakeExtras ide) $ Shake. mkDelayedAction " cabal parse modified" Info $ void $ use ParseCabal file
9999 ]
100100 }
101101 where
0 commit comments