  Let X be a smooth affine variety over a field k of characteristic 0 and T(X)
be the Lie algebra of regular vector fields on X. We compute the Lie algebra
cohomology of T(X) with coefficients in k. The answer is given in topological
terms relative to any embedding of k into complex numbers and is analogous to
the classical Gelfand-Fuks computation for smooth vector fields on a C-infinity
manifold. Unlike the C-infinity case, our setup is purely algebraic: no
topology on T(X) is present. The proof is based on the techniques of
factorization algebras, both in algebro-geometric and topological contexts.
