mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-06 18:30:35 +00:00
refactor: make document change handling async with proper awaits
This commit is contained in:
parent
7f10d611c3
commit
da388d7efc
2 changed files with 3 additions and 2 deletions
|
@ -55,7 +55,7 @@ impl Store {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn handle_did_change(
|
||||
pub async fn handle_did_change(
|
||||
&mut self,
|
||||
params: DidChangeTextDocumentParams,
|
||||
client: &Client,
|
||||
|
@ -78,7 +78,7 @@ impl Store {
|
|||
|
||||
document.version = version;
|
||||
self.versions.insert(uri.clone(), version);
|
||||
self.publish_diagnostics(&uri, client);
|
||||
self.publish_diagnostics(&uri, client).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -129,6 +129,7 @@ impl LanguageServer for DjangoLanguageServer {
|
|||
.write()
|
||||
.await
|
||||
.handle_did_change(params.clone(), &self.client)
|
||||
.await
|
||||
{
|
||||
eprintln!("Error handling document change: {}", e);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue