feat(lsp): show value on hover for const variables and CellPaths (#14940)

# Description

e.g.
<img width="299" alt="image"
src="https://github.com/user-attachments/assets/3c16835a-6d4d-48ec-b7d6-68d5bdb88ea2"
/>

and `goto def` on cell paths now finds the specific cell (only for
const) instead of doing nothing.

# User-Facing Changes
# Tests + Formatting
# After Submitting
This commit is contained in:
zc he
2025-01-28 20:17:07 +08:00
committed by GitHub
parent a2705f9eb5
commit 4bc28f1752
9 changed files with 222 additions and 336 deletions

View File

@ -68,6 +68,13 @@ impl PathMember {
} => *optional = true,
}
}
pub fn span(&self) -> Span {
match self {
PathMember::String { span, .. } => *span,
PathMember::Int { span, .. } => *span,
}
}
}
impl PartialEq for PathMember {