I've been through something similar with a leak in my place that my landlord took forever to fix, so I understand the frustration. In most Spanish autonomous communities, you have the right for the property owner to make the necessary repairs to keep the dwelling in habitable conditions, and a leak that damages the structure definitely falls into that. The problem is that withholding rent directly is legally risky - the landlord can sue you for non-payment even if you're right, and then you'd have to go to court for a judge to side with you.
The safest approach is to document everything: take photos of the damage, keep the messages where you're asking for the repair, and send a registered letter or certified email to the landlord giving them a specific deadline (usually between 10 and 15 days) to fix the leak. If they don't do it, then you do have options: you can file a complaint with your autonomous community's housing mediator, contact your municipality's housing inspection services so they can fine them, or directly consult with a lawyer about whether you can legally withhold part of the rent. In some cases you can also do the repair yourself and deduct the cost from the rent, but this requires that you've exhausted the previous attempts.
The important thing is not to suddenly pay less without leaving a record of your attempts. Keep a clear log of your communications and, if the situation doesn't move forward in two weeks, contact your town hall or seek legal advice in your area - many offer free consultations. Nobody wants a dwelling with structural damage, so a bit of official pressure usually works.