From 87578c16770b1b5b4a4363a2ea3d1ca9e5c6124f Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Sun, 12 Jan 2025 16:19:06 +0100 Subject: [PATCH] feat: make 'go list' use cmd_prefix, if specified --- lua/neotest-golang/lib/cmd.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/neotest-golang/lib/cmd.lua b/lua/neotest-golang/lib/cmd.lua index 3172195..16430a4 100644 --- a/lua/neotest-golang/lib/cmd.lua +++ b/lua/neotest-golang/lib/cmd.lua @@ -9,7 +9,8 @@ local M = {} --- Call 'go list -json {go_list_args...} ./...' to get test file data --- @param cwd string function M.golist_data(cwd) - local cmd = M.golist_command() + local cmd = options.get().cmd_prefix or {} + cmd = vim.list_extend(vim.deepcopy(cmd), M.golist_command()) local go_list_command_concat = table.concat(cmd, " ") logger.info("Running Go list: " .. go_list_command_concat .. " in " .. cwd) local result = vim.system(cmd, { cwd = cwd, text = true }):wait()