Skip to content

Commit

Permalink
on change read norminette
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLee18 committed Sep 17, 2024
1 parent f0a93e1 commit 6efc3b0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,17 @@ impl LanguageServer for Backend {
.await;
}

async fn did_change(&self, _: DidChangeTextDocumentParams) {
async fn did_change(&self, p: DidChangeTextDocumentParams) {
self.client
.log_message(MessageType::INFO, "file changed!")
.await;
let diags = read_norminette(&Path::new(p.text_document.uri.as_str())).expect(&format!(
"norminette read failed of {}",
p.text_document.uri
));
self.client
.publish_diagnostics(p.text_document.uri, diags, None)
.await
}

async fn did_save(&self, p: DidSaveTextDocumentParams) {
Expand Down

0 comments on commit 6efc3b0

Please sign in to comment.