Non-local density functional theory for the electronic and structural properties of semiconductors