Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust-analyzer codelens debugSingle support #593

Open
simlay opened this issue Jul 7, 2022 · 0 comments · May be fixed by #594
Open

rust-analyzer codelens debugSingle support #593

simlay opened this issue Jul 7, 2022 · 0 comments · May be fixed by #594

Comments

@simlay
Copy link
Contributor

simlay commented Jul 7, 2022

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?

@simlay simlay linked a pull request Jul 8, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant