Home

Awesome

logo IntelliJ plugin for Haskell

Join the chat at https://gitter.im/intellij-haskell/Lobby paypal Build

When I was learning Haskell, I missed the nice features of IntelliJ IDEA. My first approach was to use the default way of creating an IntelliJ plugin by defining a grammar and a lexer according to Haskell report. That didn't work out because I could not define all the recursion. Then I decided to use grammar and lexer definitions only for tokenizing and parsing Haskell code, and not for syntax checking the code. This is needed for syntax highlighting, all kinds of navigation, and so on. Further Haskell language support is provided with the help of external tools.

This plugin depends mainly on Stack. It can create new Stack projects and import existing Stack projects.

GHC 8.2.2 and later is supported.

Any feedback is welcomed!!

Installing the plugin

You can install this plugin using the Jetbrains plugin repository: Settings/Plugins/Browse repositories/IntelliJ-Haskell`

Installing the latest beta of the plugin

To try out the latest beta version one can install the plugin by adding https://plugins.jetbrains.com/plugins/alpha/8258 as a custom plugin repository in Settings/Plugins/Browse repositories/Manage repositories.

An alternative way to install the latest beta version is to download IntelliJ-haskell.zip from releases and apply Install plugin from disk in Settings/Plugins.

Features

Getting started

Remarks

  1. IntelliJ's Build action is not (yet) implemented. Project is built when the project is opened and when needed, e.g. when library code is changed and the user navigates to test code;
  2. About Haskell Project in Help menu shows which Haskell GHC/tools are used by the plugin for the project;
  3. GHC depends on libtinfo-dev. On Ubuntu you can install it with sudo apt-get install libtinfo-dev;
  4. Haskell tools depend on libgmp3-dev zlib1g-dev. On Ubuntu you can install them with sudo apt-get install libgmp3-dev zlib1g-dev;
  5. Cabal's internal libraries are not (yet) supported;
  6. Cabal's common stanzas are not (yet) supported;
  7. The Haskell tools are built in an IntelliJ sandbox with LTS-16. So they have no dependency on Stackage resolvers in your projects. After Stackage LTS-13 minor updates one can use Haskell>Update Haskell tools;
  8. Stack REPLs are running in the background. You can restart them by Haskell>Update Settings and Restart REPLs.

If you want to contribute to this project, read the contributing guideline.