Heat olive oil in a large pan over medium-high heat. Add onion and halloumi and cook, stirring frequently, until onions are tender and halloumi turns golden brown, about 5 minutes. Add cherry tomatoes, pressing gently to release their juice. Cook until tomatoes start to sizzle and caramelize, about 5 minutes more. Add chickpeas and cook until heated through. Remove from heat and add lemon juice, basil, and salt and pepper to taste. Serve warm or at room temperature.