Why don't we detect planets around OB stars and no terrestrial planets around A or early F stars? Looking at an exoplanet database, I noticed that there are very few planets detected around main-sequence OBA stars, and most of them are gas giants/brown dwarfs. Why can't we detect low-mass planets around these stars?
There are a number of reasons and you will see that my answer is subtly different to HDE226868's.
OBA stars are less common than FGK stars, but they are much brighter and any magnitude limited sample would contain plenty. However they have not been observed as intensively and planets are much more difficult to find around them. And the latter has actually led to the former!
Transits: OBA stars are bigger than the Sun by factors of 2-10. This increases the probability of seeing a transit by a similar factor for a planet of a given size and orbital radius. However, the amplitude of the transit is reduced by the square of that factor. This makes transits harder to detect - more or less impossible in OB stars - and they are harder to validate by observing radial velocity variations (see below).
Radial velocities: OBA stars are 2-30 times the mass of the Sun. For a given planetary mass and orbital radius this decreases the radial velocity amplitude observed in the star as $M_*^{-2/3}$. However, given the precision of current spectrographs this would not prevent the detection of hot Jupiters/Neptune's, or even cool Jupiters. No, the big problem with hot stars is the lack of spectral lines and the broad width of these lines due to the intrinsic rapid rotation of these stars. This prevents achieving the precision necessary to detect exoplanets.
More success has been obtained in identifying planets around the giant stars that evolve from A-stars. That is because as they expand, they cool, spin down and they have many sharp spectral lines. Many exoplanets have been confirmed around giant stars that would have been A stars on the main sequence.