Closed rvion closed 8 years ago
It should already do that:
There's a caveat however. If your root project folder doesn't contain cabal files, ghc-mod will search directory tree upwards and bind where it finds one (if any), which is probably not exactly what you expect.
Indeed, it seems to work Well ! I'm not able to reproduce the error I experienced last time I tried this.
There's a caveat however. If your root project folder doesn't contain cabal files, ghc-mod will search directory tree upwards and bind where it finds one (if any), which is probably not exactly what you expect.
I'm think I'm hitting this case: in my top level folder, I have ~15 sub folder, ~10 being haskell project, ~5 being other things (js, etc). but I also have a .cabal directly in the top level folder. It means that when I add all ~15 folders, the 5 without .cabal will default to the same top level one. I guess I can just remove it for now
thanks
If you don't have any Haskell files in those 'other' directories, this shouldn't be an issue. Ghc-mod gets instantiated for a given project directory only when you open a Haskell (or Cabal) file from that project directory.
yes, I did some check, and I confirm that it seems to work just fine! this is a big improvements compared to how I was using ide-haskell before
ide-haskell / ghc-mod do not currently support multi package projects. I think there is a way to change that easilly: could you have one ghc-mod session per each root project folder ? http://blog.atom.io/2015/04/15/multi-folder-projects.html
(following sentence is not a rant, just a status update, and I really thanks you for the ide-haskell and ghc-mod project) As of now, I can barely use ide-haskell / ghc-mod on my project, and find myself working against ghc slowness / other tools limitations half of the time (~10 packages / ~200 modules) everything is slow, tools crash when run simultaneously, etc. arf