perl_semantic_analyzer/analysis/semantic/hover.rs
1//! Hover information types and documentation extraction.
2
3/// Hover information for symbols displayed in LSP hover requests.
4///
5/// Provides comprehensive symbol information including signature,
6/// documentation, and contextual details for enhanced developer experience.
7///
8/// Used during Navigate/Analyze stages to answer hover queries.
9///
10/// # Performance Characteristics
11/// - Computation: <100μs for typical symbol lookup
12/// - Memory: Cached per symbol for repeated access
13/// - LSP response: <50ms end-to-end including network
14///
15/// # Perl Context Integration
16/// - Subroutine signatures with parameter information
17/// - Package qualification and scope context
18/// - POD documentation extraction and formatting
19/// - Variable type inference and usage patterns
20///
21/// Workflow: Navigate/Analyze hover details for LSP.
22#[derive(Debug, Clone)]
23pub struct HoverInfo {
24 /// Symbol signature or declaration
25 pub signature: String,
26 /// Documentation extracted from POD or comments
27 pub documentation: Option<String>,
28 /// Additional contextual details
29 pub details: Vec<String>,
30}