(
symbol: &lsp_types::DocumentSymbol,
)
| 775 | |
| 776 | #[allow(deprecated)] |
| 777 | fn flatten_document_symbol( |
| 778 | symbol: &lsp_types::DocumentSymbol, |
| 779 | ) -> Vec<lsp_types::SymbolInformation> { |
| 780 | let mut result = vec![]; |
| 781 | |
| 782 | result.push(lsp_types::SymbolInformation { |
| 783 | name: symbol.name.clone(), |
| 784 | kind: symbol.kind, |
| 785 | tags: symbol.tags.clone(), |
| 786 | deprecated: symbol.deprecated, |
| 787 | location: lsp_types::Location { |
| 788 | uri: path_to_uri(&std::path::PathBuf::new()) |
| 789 | .unwrap_or_else(|_| lsp_types::Uri::from_str("file:///").unwrap()), |
| 790 | range: symbol.selection_range, |
| 791 | }, |
| 792 | container_name: symbol.detail.clone(), |
| 793 | }); |
| 794 | |
| 795 | if let Some(children) = &symbol.children { |
| 796 | for child in children { |
| 797 | result.extend(flatten_document_symbol(child)); |
| 798 | } |
| 799 | } |
| 800 | |
| 801 | result |
| 802 | } |
| 803 | |
| 804 | pub struct LspClientRegistry { |
| 805 | clients: RwLock<HashMap<String, Arc<LspClient>>>, |
no test coverage detected