@@ -50,7 +50,7 @@ instance Pretty Log where
50
50
LogModificationTime nfp modTime ->
51
51
" Modified:" <+> pretty (fromNormalizedFilePath nfp) <+> pretty (show modTime)
52
52
LogDiagnostics nfp diags ->
53
- " Diagnostics for " <+> pretty (fromNormalizedFilePath nfp) <> " :" <+> pretty (show diags)
53
+ " Diagnostics for" <+> pretty (fromNormalizedFilePath nfp) <> " :" <+> pretty (show diags)
54
54
LogDocOpened uri ->
55
55
" Opened text document:" <+> pretty (getUri uri)
56
56
LogDocModified uri ->
@@ -68,10 +68,10 @@ descriptor recorder plId = (defaultCabalPluginDescriptor plId)
68
68
[ mkPluginNotificationHandler LSP. STextDocumentDidOpen $
69
69
\ ide vfs _ (DidOpenTextDocumentParams TextDocumentItem {_uri,_version}) -> liftIO $ do
70
70
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
75
75
76
76
, mkPluginNotificationHandler LSP. STextDocumentDidChange $
77
77
\ ide vfs _ (DidChangeTextDocumentParams VersionedTextDocumentIdentifier {_uri} _) -> liftIO $ do
@@ -83,19 +83,19 @@ descriptor recorder plId = (defaultCabalPluginDescriptor plId)
83
83
84
84
, mkPluginNotificationHandler LSP. STextDocumentDidSave $
85
85
\ 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
91
91
92
92
, 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
99
99
]
100
100
}
101
101
where
0 commit comments