  Correlations between the eigenenergies of a system's spectrum can be a
defining feature of quantum chaos. We characterize correlations between
energies for all spectral distances by studying the distributions of $k$-th
neighbor level spacings ($k$nLS) and compute their associated $k$-th neighbor
spectral form factor ($k$nSFF). Specifically, we find analytical expressions
for these signatures in paradigmatic models of quantum chaos, namely the three
Gaussian ensembles of random matrix theory, and in integrable models, taken as
systems with completely uncorrelated spectra (the Poissonian ensemble). The
spectral distance decomposition of the SFF allows us to probe the contribution
of each individual $k$nLS to the ramp. The latter is a characteristic feature
of quantum chaos, and we show how each spectral distance participates in
building it -- the linear ramp cannot be formed by short-range energy
correlations only. We illustrate our findings in the XXZ spin chain with
disorder, which interpolates between chaotic and integrable behavior.
