4

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 :)

4

2 回答 2

6

您需要在您正在工作的目录中创建一个 cabal 项目。只需运行 cabal init 并回答问题。然后在当前目录中打开 atom 。Haskell IDE 菜单应该会出现。

于 2015-04-06T00:58:50.853 回答
4

我知道这很旧,但我想提一下,如果您使用堆栈,那么您可以运行stack exec atom以在配置的 Haskell 环境中运行 atom。这对我在 Windows 上非常有用。

于 2015-08-09T13:34:35.910 回答