fix: remove pyhon path from dap

This commit is contained in:
Rónán Carrigan
2022-01-10 10:09:47 +00:00
parent 5bca040611
commit fc2506b841
2 changed files with 4 additions and 3 deletions

View File

@@ -47,17 +47,17 @@ function M.parse_positions(file_path)
return lib.treesitter.parse_positions(file_path, query) return lib.treesitter.parse_positions(file_path, query)
end end
function M.get_strategy_config(strategy, python, python_script, args) function M.get_strategy_config(strategy, python_script, args)
local config = { local config = {
dap = function() dap = function()
return { return {
type = "python", type = "python",
name = "Neotest Debugger", name = "Neotest Debugger",
request = "launch", request = "launch",
python = python,
program = python_script, program = python_script,
cwd = vim.fn.getcwd(), cwd = vim.fn.getcwd(),
args = args, args = args,
justMyCode= false,
} }
end, end,
} }

View File

@@ -84,7 +84,7 @@ function PythonNeotestAdapter.build_spec(args)
context = { context = {
results_path = results_path, results_path = results_path,
}, },
strategy = base.get_strategy_config(args.strategy, python, python_script, script_args), strategy = base.get_strategy_config(args.strategy, python_script, script_args),
} }
end end
@@ -125,3 +125,4 @@ setmetatable(PythonNeotestAdapter, {
}) })
return PythonNeotestAdapter return PythonNeotestAdapter