Skip to main content

resolve_variable_hover

Function resolve_variable_hover 

Source
pub fn resolve_variable_hover(
    text: &str,
    offset: usize,
    variables: &BTreeMap<String, String>,
) -> Option<Hover>
Expand description

Resolve hover information for a variable reference at the given byte offset.

If offset falls inside a resolved variable reference (:name, :'name', or :"name"), returns a Hover showing the variable name, its value, and the active profile. Undefined variables return None — their diagnostic already covers the error.

Returns None if the offset is not inside a variable reference, or if the variable is undefined.