Add Run|Debug hover actions

This commit is contained in:
vsrs
2020-06-06 14:30:29 +03:00
parent de74c0dcab
commit 3434f1dd2c
6 changed files with 184 additions and 24 deletions

View File

@@ -656,14 +656,14 @@ pub(crate) fn resolved_code_action(
pub(crate) fn runnable(
snap: &GlobalStateSnapshot,
file_id: FileId,
runnable: Runnable,
runnable: &Runnable,
) -> Result<lsp_ext::Runnable> {
let spec = CargoTargetSpec::for_file(snap, file_id)?;
let target = spec.as_ref().map(|s| s.target.clone());
let (cargo_args, executable_args) =
CargoTargetSpec::runnable_args(spec, &runnable.kind, &runnable.cfg_exprs)?;
let label = runnable.label(target);
let location = location_link(snap, None, runnable.nav)?;
let location = location_link(snap, None, runnable.nav.clone())?;
Ok(lsp_ext::Runnable {
label,