TL;DR: I use direnv to add stack path --bin-path directories to project-specific PATH variable. I also only use Stackage LTS which has ghc-mod as part of the distribution.

Install Stack using: curl -sSL https://get.haskellstack.org/ | sh

Install Atom using the .deb file they provide.

Install direnv using: sudo apt install direnv

Add the following line at the end of the ~/.bashrc file: eval "$(direnv hook bash)"

file: Run apm install language-haskell haskell-ghc-mod ide-haskell-cabal ide-haskell autocomplete-haskell ide-haskell-repl

Find the latest LTS Stackage distribution that has ghc-mod in it using this page. In my case it is LTS Haskell 8.24, use that for all stack installations and new projects. Without ghc-mod your development will be very slow even if you have a newer GHC compiler.

in it using this page. In my case it is LTS Haskell 8.24, use that for all stack installations and new projects. Without your development will be very slow even if you have a newer GHC compiler. Use the above Stackage version to install the following compiler tools and copy them to your stack’s compiler tools directory: stack build --copy-compiler-tool --resolver lts-8.24 hlint stylish-haskell hasktags hoogle intero ghc-mod

Create your stack project as usual. e.g. stack new my-project --resolver lts-8.24

Create .envrc file in your project directory with the following content in it: export PATH=$(stack path --bin-path)

file in your project directory with the following content in it: Run direnv allow . in your project directory so that .envrc is used.

in your project directory so that is used. Run stack test --fast --haddock-deps --file-watch and keep it running while you develop.

and keep it running while you develop. Open your project in atom, and everything should work without further changes to settings.