Skip to main content

code_lenses

Function code_lenses 

Source
pub fn code_lenses(
    uri: &Url,
    doc: &ParsedDoc,
    all_docs: &[(Url, Arc<ParsedDoc>)],
    should_cancel: impl Fn() -> bool,
) -> Vec<CodeLens>
Expand description

Build all code lenses for uri/doc, using all_docs for reference counts.

should_cancel is polled between top-level declarations; when it returns true the function returns an empty Vec immediately. Pass || false for requests that do not need cooperative cancellation.