We can use the following identity
$$\begin{align}
\csc (x)=\sum_{n=-\infty}^{\infty}\frac{(-1)^n}{x-n\pi}
\end{align}$$
which was proven in another discussion here on stackexchange.
With this it is trivial to take the Fourier transform term by term:
$$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty dx \csc(x)e^{iwx}=i\sqrt{\frac{\pi}{2}}\text{sign}(w)\sum_{n=-\infty}^{\infty}e^{i\pi n(1+w)}$$
Note that due to the $\text{sign}(w)$ in front this is actually not the Dirac comb.
EDIT
There is also a very simple way to derive the result from residues:
The integral $\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty dx \csc(x)e^{iwx}$ naturally has holes at all positions $x=\pi n$ with $n\in\mathbb{Z}$, to even be defined (since integers are a set of zero measure with respect to the real line, it is still the full Fourier transform).
If $w>0$ (or $w<0$) we can close the contour at its far ends via the upper (or lower) half plane. This adds zero contribution to the integral due to Jordan's lemma.
Then deforming the half circle contour back to the real line, we cancel all contributions from the initial integral and are left with just tiny half-circles around each $x=\pi n$ point in counter-clockwise (or clockwise) direction.
The half-circles contribute half a residue each. Counter-clockwise gives positive residue while clockwise gives negative residue, therefore we immediately find a $\text{sign}(w)$ term to be multiplied with the result.
Since $1/\sin(x)$ only has simple poles, we trivially have:
$$\frac{2\pi i}{2}\text{res}_{x=\pi n}\left(\frac{1}{\sqrt{2\pi}} \csc(x)e^{iwx}\right)=i\sqrt{\frac{\pi}{2}}e^{i\pi n(1+w)}$$
So that again, the full result properly is
$$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty dx \csc(x)e^{iwx}=i\sqrt{\frac{\pi}{2}}\text{sign}(w)\sum_{n=-\infty}^{\infty}e^{i\pi n(1+w)}.$$