haskell / haskell-mode

Emacs mode for Haskell
http://haskell.github.io/haskell-mode/
GNU General Public License v3.0
1.33k stars 344 forks source link

automatically change session target based on buffer #1841

Open Atemu opened 7 months ago

Atemu commented 7 months ago

One very confusion thing to me as I am very new to cabal was how targets work and it took me quite a while to figure all of this out.

It would have been a lot simpler (and would still be more convenient) if the session could be automagically changed depending on which buffer you're in.

haskell-mode should be able to figure out which component a buffer belongs to by comparing its path with the components' hs-source-dirs.