+ where
+ respond :: (MonadIO m, HasReader SessionContext m) => FromServerMessage -> m ()
+ respond (FromServerMess SWindowWorkDoneProgressCreate req) =
+ sendMessage $ ResponseMessage "2.0" (Just $ req ^. LSP.id) (Right ())
+ respond (FromServerMess SWorkspaceApplyEdit r) = do
+ sendMessage $ ResponseMessage "2.0" (Just $ r ^. LSP.id) (Right $ ApplyWorkspaceEditResponseBody True Nothing)
+ respond _ = pure ()
+
+
+-- extract Uri out from DocumentChange
+-- didn't put this in `lsp-types` because TH was getting in the way
+documentChangeUri :: DocumentChange -> Uri
+documentChangeUri (InL x) = x ^. textDocument . uri
+documentChangeUri (InR (InL x)) = x ^. uri
+documentChangeUri (InR (InR (InL x))) = x ^. oldUri
+documentChangeUri (InR (InR (InR x))) = x ^. uri