local function find_table_with_value(tables, search_value)
	for _, tbl in ipairs(tables) do
		for _, value in pairs(tbl) do
			if value == search_value then
				return tbl
			end
		end
	end
	return nil
end

return {
	{
		"mfussenegger/nvim-dap",
		optional = true,
		config = function()
            local root = vim.lsp.get_clients()[1].root_dir
			table.insert(require("dap").configurations.python, {
				type = "python",
				request = "launch",
				name = "custom",
				program = root .. "/plugins/modules/compose.py",
				console = "integratedTerminal",
				pythonPath = os.getenv("VIRTUAL_ENV") .. "/bin/python",
				args = { root .. "/test.json" },
				justMyCode = false,
			})
			find_table_with_value(require("lazyvim.plugins.extras.dap.core"), "mfussenegger/nvim-dap").config()
		end,
	},
}