I have a powerful linux desktop box that I run my builds on, and a light weight 13" 2015 Macbook Pro to connect to it. I check-out the code onto my linux box and scp it down to my Mac (ignoring source control folders) and subsequently use rsync to keep both the boxes in sync (there's an Atom plug-in that rsyncs every time you save).
I get native OSX performance as I edit code and I get to run fast builds on my desktop, so it's a pretty nice win-win scenario as far as I'm concerned.
Have you considered just keeping your code on the desktop and mounting it to your OSX host via NFS? I was doing this up until recently (was running Atom instead of emacs) and it worked really well. Might be an option if your latency is low enough.
I actually tried "desktop Linux" last weekend to see if I could just ditch OSX entirely. The first experience I had was that the mouse cursor in 16.10 does not move in the installer and livecd boot. I installed 16.04, played with a bunch of the desktop environments, and was ultimately unhappy with the feel of them. They're just too alien and inconsistent compared to OSX.
I'm probably just going to keep the current setup until this MBP dies, then I'll get whatever the best Mac Mini equivalent is (HP Z2, Intel Skull Canyon, etc.) and switch to Linux finally.
Do you have any advice on how to keep the memory footprint low?
I regularly run 30-40 VMs at once on my dev server at work (40 cpus, 384gb ram), and I haven't had any problems like this there or at home...
macOS seems to be more stable under this setup, and if I need any tools I'd normally get from homebrew on the host (say, I want to download a Youtube video using youtube-dl) I just do it in the VM into a shared folder.
I'll probably replace this laptop when it dies with the HP Z2 Mini which was on HN a week or two ago running Linux directly since I want more than 16gb ram and Apple doesn't think that's worth supporting.