Skip to content

rust-analyzer codelens debugSingle support #593

Open
@simlay

Description

@simlay

I see that we have rust_analyzer_run_single to do a rust-analyzer.runSingle.

To do something like rust_analyzer_debug_single, rather than simply cargo ${cargoArgs} ${cargoExtraArgs} -- ${executableArgs} a debug_single for rust would do something like following:

  • if cargoArgs[0] == "test", shell out cargo test --no-run --message-format=json -q ${cargoArgs} ${cargoExtraArgs}
  • if cargoArgs[0] == "run", shell out cargo build --message-format=json -q ${cargoArgs} ${cargoExtraArgs}
  • Parse the output json to Then use something like termDebug or vimspector. It seems like there's a need for an external dependency.

coc-rust-analyzer does something similar.

Anyway, I looked into this a bunch and but I my vimscript is pretty weak/in-existent so I figured I'd write an issue before doing it.

Is there interest in this addition?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions