diff options
author | Hennadii Chernyshchyk <genaloner@gmail.com> | 2022-09-28 20:49:17 +0300 |
---|---|---|
committer | Hennadii Chernyshchyk <genaloner@gmail.com> | 2022-09-28 20:49:17 +0300 |
commit | d4b683739e4f1b530eb66e0783a1e3dad5e4b21b (patch) | |
tree | 8a380acb4a995c5ba1c151369e94b86f709bb2bc | |
parent | 752554fceb187ee9f6542a279dbe3b9228f11dbe (diff) | |
download | neovim-tasks-d4b683739e4f1b530eb66e0783a1e3dad5e4b21b.tar.gz neovim-tasks-d4b683739e4f1b530eb66e0783a1e3dad5e4b21b.zip |
Detect project from global arguments
Because debug arguments are passed directly to the running program.
-rw-r--r-- | lua/tasks/module/cargo.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 | |||
121 | ---@param previous_job table | 121 | ---@param previous_job table |
122 | ---@return table? | 122 | ---@return table? |
123 | local function debug_test(module_config, previous_job) | 123 | local function debug_test(module_config, previous_job) |
124 | local package = get_executable_package(previous_job:result(), vim.tbl_get(module_config, 'args', 'debug_test')) | 124 | local package = get_executable_package(previous_job:result(), utils.split_args(module_config.global_cargo_args)) |
125 | if not package then | 125 | if not package then |
126 | return | 126 | return |
127 | end | 127 | end |
@@ -149,7 +149,7 @@ end | |||
149 | ---@param previous_job table | 149 | ---@param previous_job table |
150 | ---@return table? | 150 | ---@return table? |
151 | local function debug(module_config, previous_job) | 151 | local function debug(module_config, previous_job) |
152 | local package = get_executable_package(previous_job:result(), vim.tbl_get(module_config, 'args', 'debug')) | 152 | local package = get_executable_package(previous_job:result(), utils.split_args(module_config.global_cargo_args)) |
153 | if not package then | 153 | if not package then |
154 | return | 154 | return |
155 | end | 155 | end |