European governments have agreed to pour money into everything from electric cars to renewable energy and agriculture.