Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
hatoo committed Sep 12, 2023
1 parent 4e62f44 commit b9ffa9d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,12 @@ impl LanguageServer for Backend {
.log_message(MessageType::INFO, "file saved!")
.await;
}
async fn did_close(&self, _: DidCloseTextDocumentParams) {
async fn did_close(&self, param: DidCloseTextDocumentParams) {
self.client
.log_message(MessageType::INFO, "file closed!")
.await;

self.document_map.remove(&param.text_document.uri);
}

async fn semantic_tokens_full(
Expand Down Expand Up @@ -353,13 +355,13 @@ impl LanguageServer for Backend {
}

if markdown.is_empty() {
return Ok(None);
Ok(None)
} else {
Ok(Some(Hover {
contents: HoverContents::Scalar(MarkedString::String(markdown)),
range: None,
}))
}

Ok(Some(Hover {
contents: HoverContents::Scalar(MarkedString::String(markdown)),
range: None,
}))
}

async fn completion(&self, params: CompletionParams) -> Result<Option<CompletionResponse>> {
Expand Down

0 comments on commit b9ffa9d

Please sign in to comment.