Add a field to MultiLSPQuery span showing the current request (#35372)

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2025-07-31 15:40:19 -07:00 committed by GitHub
parent 4a82b6c5ee
commit 2b36d4ec94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 31 additions and 2 deletions

View file

@ -784,6 +784,25 @@ pub fn split_repository_update(
}])
}
impl MultiLspQuery {
pub fn request_str(&self) -> &str {
match self.request {
Some(multi_lsp_query::Request::GetHover(_)) => "GetHover",
Some(multi_lsp_query::Request::GetCodeActions(_)) => "GetCodeActions",
Some(multi_lsp_query::Request::GetSignatureHelp(_)) => "GetSignatureHelp",
Some(multi_lsp_query::Request::GetCodeLens(_)) => "GetCodeLens",
Some(multi_lsp_query::Request::GetDocumentDiagnostics(_)) => "GetDocumentDiagnostics",
Some(multi_lsp_query::Request::GetDocumentColor(_)) => "GetDocumentColor",
Some(multi_lsp_query::Request::GetDefinition(_)) => "GetDefinition",
Some(multi_lsp_query::Request::GetDeclaration(_)) => "GetDeclaration",
Some(multi_lsp_query::Request::GetTypeDefinition(_)) => "GetTypeDefinition",
Some(multi_lsp_query::Request::GetImplementation(_)) => "GetImplementation",
Some(multi_lsp_query::Request::GetReferences(_)) => "GetReferences",
None => "<unknown>",
}
}
}
#[cfg(test)]
mod tests {
use super::*;