style: format seluruh workspace dengan cargo fmt
Menyeragamkan format kode sesuai rustfmt (126 file). Sebelumnya lefthook pre-commit 'cargo fmt --check' akan gagal pada commit apa pun.
This commit is contained in:
1 parent
884b19ccb5
commit
7b0b53671f
127 files changed
+1271
-1156
No files matched your search
@@ -7,7 +7,7 @@
|
||||
use crate::tools::{Tool, ToolCtx};
|
||||
use anyhow::Result;
|
||||
use serde_json::{json, Value};
|
||||
use tracing::{info, error, instrument};
|
||||
use tracing::{error, info, instrument};
|
||||
|
||||
/// Tool that retrieves diagnostics (errors, warnings) from the LSP for a file.
|
||||
///
|
||||
@@ -56,9 +56,12 @@ impl Tool for LspDiagnostics {
|
||||
}
|
||||
};
|
||||
if let Some(client) = manager.get_client(&language) {
|
||||
let result = client.send_request("textDocument/diagnostic", &json!({
|
||||
"textDocument": { "uri": format!("file://{}", path) }
|
||||
}))?;
|
||||
let result = client.send_request(
|
||||
"textDocument/diagnostic",
|
||||
&json!({
|
||||
"textDocument": { "uri": format!("file://{}", path) }
|
||||
}),
|
||||
)?;
|
||||
Ok(serde_json::to_string_pretty(&result)?)
|
||||
} else {
|
||||
anyhow::bail!("no LSP client connected for '{language}'")
|
||||
|
||||
Reference in new issue
Block a user