intellij-haskforce icon indicating copy to clipboard operation
intellij-haskforce copied to clipboard

NixPkgs support

Open fatlazycat opened this issue 10 years ago • 5 comments

Any plans to add support for nix package mgt / nix shell etc ?

Thanks

fatlazycat avatar Jan 13 '15 10:01 fatlazycat

+1 Was going to ask the same question

jkozlowski avatar Jan 26 '15 20:01 jkozlowski

I think that simply being able to provide a command (as opposed to just a path) for tools like ghc-mod would work (maybe?). For example, with the setup described in http://wiki.ocharles.org.uk/Nix, the following works fine:

nix-shell -I ~ --command 'ghc-mod browse Database.Kdb.Internal.Types'

jkozlowski avatar Feb 05 '15 21:02 jkozlowski

I don't know if it's just luck, but the following started working for me like a charm:

nix-shell -I ~ --command 'open /Applications/IntelliJ\ IDEA\ 14\ CE.app/'

So just follow up the setup as described in the link above and then in your project directory (where the generated shell.nix is) start IntelliJ through nix-shell and suddenly ghc-mod spring up to life.

jkozlowski avatar Feb 07 '15 11:02 jkozlowski

for anyone who might end up here, this advice seems to work well still. I'm new to haskell, but I was at least able to get things like Jump to Definition working with this plugin via my Nix project.

from https://github.com/carymrobbins/intellij-haskforce/wiki/Quick-Start-Guide , you can follow the instructions to set up a new Cabal project, for instance, and the links to GHC and Cabal were automatically filled in for me if I started Intellij via nix-shell as suggested above by @jkozlowski (they were empty if I started intellij normally)

screen shot 2019-01-17 at 10 35 01 am

ekilah avatar Jan 17 '19 18:01 ekilah

Nice! Thanks @ekilah!

carymrobbins avatar Jan 17 '19 20:01 carymrobbins