mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-20 20:45:41 +00:00
Rename Red Knot (#17820)
This commit is contained in:
parent
e6a798b962
commit
b51c4f82ea
1564 changed files with 1598 additions and 1578 deletions
18
crates/ty_server/src/server/api/diagnostics.rs
Normal file
18
crates/ty_server/src/server/api/diagnostics.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
use lsp_server::ErrorCode;
|
||||
use lsp_types::{notification::PublishDiagnostics, PublishDiagnosticsParams, Url};
|
||||
|
||||
use crate::server::client::Notifier;
|
||||
use crate::server::Result;
|
||||
|
||||
use super::LSPResult;
|
||||
|
||||
pub(super) fn clear_diagnostics(uri: &Url, notifier: &Notifier) -> Result<()> {
|
||||
notifier
|
||||
.notify::<PublishDiagnostics>(PublishDiagnosticsParams {
|
||||
uri: uri.clone(),
|
||||
diagnostics: vec![],
|
||||
version: None,
|
||||
})
|
||||
.with_failure_code(ErrorCode::InternalError)?;
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue