From d4b683739e4f1b530eb66e0783a1e3dad5e4b21b Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Wed, 28 Sep 2022 20:49:17 +0300 Subject: Detect project from global arguments Because debug arguments are passed directly to the running program. --- lua/tasks/module/cargo.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/tasks/module/cargo.lua') diff --git a/lua/tasks/module/cargo.lua b/lua/tasks/module/cargo.lua index 3e21371..7c3ffdd 100644 --- a/lua/tasks/module/cargo.lua +++ b/lua/tasks/module/cargo.lua @@ -121,7 +121,7 @@ end ---@param previous_job table ---@return table? local function debug_test(module_config, previous_job) - local package = get_executable_package(previous_job:result(), vim.tbl_get(module_config, 'args', 'debug_test')) + local package = get_executable_package(previous_job:result(), utils.split_args(module_config.global_cargo_args)) if not package then return end @@ -149,7 +149,7 @@ end ---@param previous_job table ---@return table? local function debug(module_config, previous_job) - local package = get_executable_package(previous_job:result(), vim.tbl_get(module_config, 'args', 'debug')) + local package = get_executable_package(previous_job:result(), utils.split_args(module_config.global_cargo_args)) if not package then return end -- cgit v1.2.3