Add a field to MultiLSPQuery span showing the current request (#35372)
Release Notes: - N/A
This commit is contained in:
parent
4a82b6c5ee
commit
2b36d4ec94
2 changed files with 31 additions and 2 deletions
|
@ -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::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue