IntelliJ IDEA 2021.2 Help

Start with a Project

Create New

Once you have set up the environment, you can proceed with creating a new Erlang project in IntelliJ IDEA from scratch.

New Pure Erlang Project

  1. From the main menu, select File | New | Project.
    In the dialog that appears, choose Erlang as the project's base.
    Ignore the additional frameworks at this point and click Next.

  2. Make sure the correct SDK is selected and click Next.

  3. Give your project a name and choose where to save it. Click Finish to close the dialog.

New Rebar3 Project

Instead of creating a pure Erlang project, you may want to use Rebar3 to generate it from one of the built-in templates.

It can be done from within the IDE provided that Rebar3 was installed and added to system PATH:

  1. Open the Terminal tool window Alt+F12

  2. Enter the following command:

    rebar3 new app myAwesomeProject

This will generate a new project called myAwesomeProject from the built-in Rebar3 template called app.

Running rebar3 from IDE terminal

Once generated, the project needs to be imported into the IDE so that you can work with it. See next section for details.

Import Existing

If you already have an Erlang project, you can follow the steps from this guide to import it into IntelliJ IDEA.

Import Rebar Project

Importing existing Erlang project

    Project Structure

    Project View

    For a common Erlang project created with Rebar3, the overall structure will look like this in IntelliJ IDEA:

    Erlang Project Structure

      Parse Transform Settings

      Parse transformations are Erlang modules that rewrite other Erlang modules using different semantics of the Erlang syntax.

      You can set your Erlang module's global parse transforms in the Project Structure Ctrl+Alt+Shift+S dialog, Modules | <module name> | Erlang section:

      Erlang Parse Transform settings
        Last modified: 15 June 2021