I recall seeing that the category of schemes can be captured by a general construction as follows.
Let $\mathbf{Spec}\colon \mathbf{CRing}^{op}\to \mathbf{LRS}$ be the usual functor from the category of commutative rings to the category of locally ringed spaces by assigning a ring to its structured sheaf.
Now, this is where I am a bit hesitant to continue, since we are to take the Yoneda extension along $\mathbf y\colon \mathbf{CRing}^{op}\to \mathbf{Set}^{\mathbf{CRing}}$ to a essentially unique functor $L\colon \mathbf{Set}^{\mathbf{CRing}}\to \mathbf{LRS}$ such that $L\circ \mathbf y=\mathbf{Spec}$. By the general construction, $L$ has a right adjoint, $R\colon \mathbf{LRS}\to \mathbf{Set}^{\mathbf{CRing}}$.
My concern is that the usual construction of $L$ is taken to be $L(F)=colim_{el(F)}\mathbf{Spec}\circ \pi_F$, where $\pi_F\colon el(F)\to \mathbf{CRing}$ is the natural projection. However, $el(F)$ is not guaranteed to be small and $\mathbf{LRS}$ does not have all large colimits.
Is there a way to make this idea work so that the category of schemes is equivalent to the full subcategory consisting of locally ringed spaces $(X,\mathscr O_X)$ such that the unit of the adjunction $\eta_X\colon LR(X)\to X$ is an isomorphism? Perhaps we should restrict $\mathbf{Set}^{\mathbf{CRing}}$ to be the smallest subcategory which includes only those objects which have colimits we want.