I've been frustrated with the lack of per-window environment variables. It renders my Go workflow nearly impossible.
In my most recent attempt to fix it, I discovered the
init.coffee hook. This runs after each window is loaded. Perfect!
Take a look at my first stab at CoffeeScript to solve my problem:
This reads a file in the project directory and sets the environment. I added a quick hack for resolving relative paths inside the project.
Works like a charm!