Basic support C++20 named module. (#12)
This commit is contained in:
@@ -5,25 +5,24 @@ namespace clice {
|
||||
async::promise<void> Server::onDidOpen(const proto::DidOpenTextDocumentParams& params) {
|
||||
auto path = URI::resolve(params.textDocument.uri);
|
||||
llvm::StringRef content = params.textDocument.text;
|
||||
|
||||
co_await scheduler.add(path, content);
|
||||
co_await scheduler.update(path, content, synchronizer);
|
||||
}
|
||||
|
||||
async::promise<void> Server::onDidChange(const proto::DidChangeTextDocumentParams& document) {
|
||||
auto path = URI::resolve(document.textDocument.uri);
|
||||
llvm::StringRef content = document.contentChanges[0].text;
|
||||
co_await scheduler.update(path, content);
|
||||
co_await scheduler.update(path, content, synchronizer);
|
||||
}
|
||||
|
||||
async::promise<void> Server::onDidSave(const proto::DidSaveTextDocumentParams& document) {
|
||||
auto path = URI::resolve(document.textDocument.uri);
|
||||
co_await scheduler.save(path);
|
||||
/// co_await scheduler.save(path);
|
||||
co_return;
|
||||
}
|
||||
|
||||
async::promise<void> Server::onDidClose(const proto::DidCloseTextDocumentParams& document) {
|
||||
auto path = URI::resolve(document.textDocument.uri);
|
||||
co_await scheduler.close(path);
|
||||
/// co_await scheduler.close(path);
|
||||
co_return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user