All owners are free to enclose their property without any opposition from neighbours. The fence however must neither encroach on the neighbour’s property nor abridge his/her rights (a right of passage for example)
If the fence is erected along the line that separates your property from your neighbour’s property, it is called a boundary fence. It is equally shared by the 2 owners who jointly assume its installation, repair, and maintenance costs.
Be careful, using plants as a fence is governed by specific rules (art. 671 of the Civil Code).
Bushes (plants under 2 meters in height) must be planted 0.5 m away from the boundary line. Standard trees (plants exceeding 2 meters) must comply with a distance of at least 2 meters in relation to the neighbour’s property line.