pub fn code_lenses(
uri: &Uri,
doc: &ParsedDoc,
store: &DocumentStore,
imports: &HashMap<String, String>,
scopes: &CodeLensScopeCache,
should_cancel: impl Fn() -> bool,
) -> Vec<CodeLens>Expand description
Build all code lenses for uri/doc. Reference-count lenses come back
without a command; resolve_code_lens fills them in. Their symbols are
recorded in scopes so the first resolve can narrow them all at once.
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.