I rent a parking space in the neighboring residence. My landlord informed me that he sold it to one of the building's co-owners without offering it to me first. Is he allowed to do so ?

Yes. The tenant's right of first refusal exists only in specific cases defined by law, such as for unfurnished residential leases (Article 15 II of the law of July 6, 1989). In the case of selling a parking space, no law provides a right of priority for the tenant. Therefore, your landlord was not obligated to offer you the purchase of the parking space you are renting.