Skip to main content

handle_code_lens

Function handle_code_lens 

Source
pub async fn handle_code_lens(
    state: Arc<ServerState>,
    params: CodeLensParams,
    enabled: bool,
    client: Client,
    config: Arc<RwLock<DepsConfig>>,
) -> Vec<CodeLens>
Expand description

Handles textDocument/codeLens requests using trait-based delegation.

Returns zero or one lens for the document. Zero when: the code lens feature is disabled (enabled is false); the document cannot be loaded; it has no parse result; it is not ready for a batch update (version data is still loading, or the document has no known LSP version — the same two conditions execute_update_all_outdated requires, so the lens never renders a click target the command would then refuse); or every dependency is up to date / not safely editable (see deps_core::lsp_helpers::collect_update_all_edits).