  We study the asymptotic behavior of three classes of nonlocal functionals in
complete metric spaces equipped with a doubling measure and supporting a
Poincar\'e inequality. We show that the limits of these nonlocal functionals
are comparable to the variation $\| Df\|(\Omega)$ or the Sobolev semi-norm
$\int_\Omega g_f^p\, d\mu$, which extends Euclidean results to metric measure
spaces. In contrast to the classical setting, we also give an example to show
that the limits are not always equal to the corresponding total variation even
for Lipschitz functions.
