Search code examples
haskellideatom-editorghc-mod

ide-haskell for atom editor isn't working


I'm trying to use the Ide-Haskell package for atom, but for some reason, it's not working.

First, I have ghc-mod and stylish haskell installed in sandboxes under ~/lib/. Here is what my config.cson file looks like:

athan@THETA ~> cat ~/.atom/config.cson
'global':
  'exception-reporting':
    'userId': '3b5a8a6c-7778-b310-6a5f-d8ecc314b30f'
  'welcome':
    'showOnStartup': false
  'core':
    'themes': [
      'atom-dark-ui'
      'seti-syntax'
    ]
  'ide-haskell':
    'ghcModPath': '/home/athan/lib/ghc-mod-5.2.1.1/.cabal-sandbox/bin/ghc-mod'
    'stylishHaskellPath': '/home/athan/lib/stylish-haskell-0.5.11.0/.cabal-sandbox/bin/stylish-haskell'
  'editor':
    'fontSize': 14
    'showIndentGuide': true
    'showInvisibles': true
    'softWrapAtPreferredLineLength': true
    'invisibles': {}

I've tested those paths, and they're correct - I can call command --help, etc.

I'm also currently running linux, not Mac, so I had to add some keymappings:

athan@THETA ~> cat ~/.atom/keymap.cson
'.workspace':
  'ctrl-alt-o': 'ide-haskell:toggle-output'
'.editor':
  'ctrl-alt-s': 'ide-haskell:prettify-file'

These register just fine, and are visible in the ide-haskell's package settings. However, issuing the keystroke doesn't do anything (It used to open a file and save-as, respectively).

Where am I most likely to have screwed up? I installed ide-haskell before finishing the ghc-mod installation, but that shouldn't really matter... the links are correct. If anyone could help with this, I would be ecstatic :)


Solution

  • You need to create a cabal project in the directory you're working in. Just run cabal init and answer the questions. Then open atom in the current directory. The Haskell IDE menu should appear.