More maintainable config
Rather than eagerly converting JSON, we losslessly keep it as is, and change the shape of user-submitted data at the last moment. This also allows us to remove a bunch of wrong Defaults
This commit is contained in:
@@ -818,7 +818,7 @@ pub(crate) fn runnable(
|
||||
file_id: FileId,
|
||||
runnable: Runnable,
|
||||
) -> Result<lsp_ext::Runnable> {
|
||||
let config = &snap.config.runnables;
|
||||
let config = snap.config.runnables();
|
||||
let spec = CargoTargetSpec::for_file(snap, file_id)?;
|
||||
let workspace_root = spec.as_ref().map(|it| it.workspace_root.clone());
|
||||
let target = spec.as_ref().map(|s| s.target.clone());
|
||||
@@ -833,9 +833,9 @@ pub(crate) fn runnable(
|
||||
kind: lsp_ext::RunnableKind::Cargo,
|
||||
args: lsp_ext::CargoRunnable {
|
||||
workspace_root: workspace_root.map(|it| it.into()),
|
||||
override_cargo: config.override_cargo.clone(),
|
||||
override_cargo: config.override_cargo,
|
||||
cargo_args,
|
||||
cargo_extra_args: config.cargo_extra_args.clone(),
|
||||
cargo_extra_args: config.cargo_extra_args,
|
||||
executable_args,
|
||||
expect_test: None,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user