@@ -55,41 +55,41 @@ whenUriFile uri act = whenJust (LSP.uriToFilePath uri) $ act . toNormalizedFileP
5555descriptor :: Recorder (WithPriority Log ) -> PluginId -> PluginDescriptor IdeState
5656descriptor recorder plId = (defaultPluginDescriptor plId) { pluginNotificationHandlers = mconcat
5757 [ mkPluginNotificationHandler LSP. STextDocumentDidOpen $
58- \ ide _ (DidOpenTextDocumentParams TextDocumentItem {_uri,_version}) -> liftIO $ do
58+ \ ide vfs _ (DidOpenTextDocumentParams TextDocumentItem {_uri,_version}) -> liftIO $ do
5959 atomically $ updatePositionMapping ide (VersionedTextDocumentIdentifier _uri (Just _version)) (List [] )
6060 whenUriFile _uri $ \ file -> do
6161 -- We don't know if the file actually exists, or if the contents match those on disk
6262 -- For example, vscode restores previously unsaved contents on open
6363 addFileOfInterest ide file Modified {firstOpen= True }
64- setFileModified (cmapWithPrio LogFileStore recorder) ide False file
64+ setFileModified (cmapWithPrio LogFileStore recorder) ( VFSModified vfs) ide False file
6565 logDebug (ideLogger ide) $ " Opened text document: " <> getUri _uri
6666
6767 , mkPluginNotificationHandler LSP. STextDocumentDidChange $
68- \ ide _ (DidChangeTextDocumentParams identifier@ VersionedTextDocumentIdentifier {_uri} changes) -> liftIO $ do
68+ \ ide vfs _ (DidChangeTextDocumentParams identifier@ VersionedTextDocumentIdentifier {_uri} changes) -> liftIO $ do
6969 atomically $ updatePositionMapping ide identifier changes
7070 whenUriFile _uri $ \ file -> do
7171 addFileOfInterest ide file Modified {firstOpen= False }
72- setFileModified (cmapWithPrio LogFileStore recorder) ide False file
72+ setFileModified (cmapWithPrio LogFileStore recorder) ( VFSModified vfs) ide False file
7373 logDebug (ideLogger ide) $ " Modified text document: " <> getUri _uri
7474
7575 , mkPluginNotificationHandler LSP. STextDocumentDidSave $
76- \ ide _ (DidSaveTextDocumentParams TextDocumentIdentifier {_uri} _) -> liftIO $ do
76+ \ ide vfs _ (DidSaveTextDocumentParams TextDocumentIdentifier {_uri} _) -> liftIO $ do
7777 whenUriFile _uri $ \ file -> do
7878 addFileOfInterest ide file OnDisk
79- setFileModified (cmapWithPrio LogFileStore recorder) ide True file
79+ setFileModified (cmapWithPrio LogFileStore recorder) ( VFSModified vfs) ide True file
8080 logDebug (ideLogger ide) $ " Saved text document: " <> getUri _uri
8181
8282 , mkPluginNotificationHandler LSP. STextDocumentDidClose $
83- \ ide _ (DidCloseTextDocumentParams TextDocumentIdentifier {_uri}) -> liftIO $ do
83+ \ ide vfs _ (DidCloseTextDocumentParams TextDocumentIdentifier {_uri}) -> liftIO $ do
8484 whenUriFile _uri $ \ file -> do
8585 deleteFileOfInterest ide file
8686 let msg = " Closed text document: " <> getUri _uri
8787 scheduleGarbageCollection ide
88- setSomethingModified ide [] $ Text. unpack msg
88+ setSomethingModified ( VFSModified vfs) ide [] $ Text. unpack msg
8989 logDebug (ideLogger ide) msg
9090
9191 , mkPluginNotificationHandler LSP. SWorkspaceDidChangeWatchedFiles $
92- \ ide _ (DidChangeWatchedFilesParams (List fileEvents)) -> liftIO $ do
92+ \ ide vfs _ (DidChangeWatchedFilesParams (List fileEvents)) -> liftIO $ do
9393 -- See Note [File existence cache and LSP file watchers] which explains why we get these notifications and
9494 -- what we do with them
9595 -- filter out files of interest, since we already know all about those
@@ -106,24 +106,24 @@ descriptor recorder plId = (defaultPluginDescriptor plId) { pluginNotificationHa
106106 logDebug (ideLogger ide) $ " Watched file events: " <> Text. pack msg
107107 modifyFileExists ide fileEvents'
108108 resetFileStore ide fileEvents'
109- setSomethingModified ide [] msg
109+ setSomethingModified ( VFSModified vfs) ide [] msg
110110
111111 , mkPluginNotificationHandler LSP. SWorkspaceDidChangeWorkspaceFolders $
112- \ ide _ (DidChangeWorkspaceFoldersParams events) -> liftIO $ do
112+ \ ide _ _ (DidChangeWorkspaceFoldersParams events) -> liftIO $ do
113113 let add = S. union
114114 substract = flip S. difference
115115 modifyWorkspaceFolders ide
116116 $ add (foldMap (S. singleton . parseWorkspaceFolder) (_added events))
117117 . substract (foldMap (S. singleton . parseWorkspaceFolder) (_removed events))
118118
119119 , mkPluginNotificationHandler LSP. SWorkspaceDidChangeConfiguration $
120- \ ide _ (DidChangeConfigurationParams cfg) -> liftIO $ do
120+ \ ide vfs _ (DidChangeConfigurationParams cfg) -> liftIO $ do
121121 let msg = Text. pack $ show cfg
122122 logDebug (ideLogger ide) $ " Configuration changed: " <> msg
123123 modifyClientSettings ide (const $ Just cfg)
124- setSomethingModified ide [toKey GetClientSettings emptyFilePath] " config change"
124+ setSomethingModified ( VFSModified vfs) ide [toKey GetClientSettings emptyFilePath] " config change"
125125
126- , mkPluginNotificationHandler LSP. SInitialized $ \ ide _ _ -> do
126+ , mkPluginNotificationHandler LSP. SInitialized $ \ ide _ _ _ -> do
127127 --------- Initialize Shake session --------------------------------------------------------------------
128128 liftIO $ shakeSessionInit (cmapWithPrio LogShake recorder) ide
129129
0 commit comments