MCPcopy Index your code
hub / github.com/WhatsApp/erlang-language-platform

github.com/WhatsApp/erlang-language-platform @0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.0 ↗ · + Follow
4,205 symbols 14,503 edges 234 files 260 documented · 6% updated 1d ago2026-06-10 · 2026-06-11★ 41346 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Erlang Language Platform (ELP)

ELP logo

Description

ELP integrates Erlang into modern IDEs via the language server protocol.

ELP was inspired by rust-analyzer.

Terms of Use

You are free to copy, modify, and distribute ELP with attribution under the terms of the Apache-2.0 and MIT licences. See LICENCE-APACHE and LICENCE-MIT for details.

Prerequisites

VS Code

Coming soon.

Emacs

  1. Download the appropriate elp executable from https://github.com/WhatsApp/erlang-language-platform/releases, and make sure it is on your $PATH.
  2. Add the following to your emacs init file
(use-package lsp-mode
  :custom
  (lsp-semantic-tokens-enable t)

  :config
  ;; Enable LSP automatically for Erlang files
  (add-hook 'erlang-mode-hook #'lsp)

  ;; ELP, added as priority 0 (> -1) so takes priority over the built-in one
  (lsp-register-client
   (make-lsp-client :new-connection (lsp-stdio-connection '("elp" "server"))
                    :major-modes '(erlang-mode)
                    :priority 0
                    :server-id 'erlang-language-platform))
  )

How to use ELP

Using it with rebar3 projects

  1. Use OTP 25
  2. Download the elp binary for your system from https://github.com/WhatsApp/erlang-language-platform/releases

    On Mac you will probably get the following message when trying to run the executable the first time: "elp cannot be opened because the developer cannot be verified.". To solve this, go to Preferences > Security and Privacy and add an exception. Alternatively, you can build elp from source.

  3. Add eqwalizer_support dependency and eqwalizer_rebar3 plugin to your rebar3 project definition (see below)

  4. From the project directory run:
  5. elp eqwalize <module> to type-check a single module
  6. elp eqwalize-all to type-check all src modules in the project

Adding eqwalizer_support and eqwalizer_rebar3:

{deps, [
  {eqwalizer_support,
    {git_subdir,
        "https://github.com/whatsapp/eqwalizer.git",
        {branch, "main"},
        "eqwalizer_support"}}
]}.

{project_plugins, [
  {eqwalizer_rebar3,
    {git_subdir,
        "https://github.com/whatsapp/eqwalizer.git",
        {branch, "main"},
        "eqwalizer_rebar3"}}
]}.

References

Contributing

  • CONTRIBUTING.md: Provides an overview of how to contribute changes to ELP (e.g., diffs, testing, etc)

FAQ

Please refer to the FAQ document for answers to some common questions, including:

  • What's the difference between ELP and Erlang LS?
  • Why not extend Erlang LS, rather than creating a new tool?
  • Why is ELP implemented in Rust, rather than Erlang?

License

erlang-language-platform is dual-licensed * Apache. * MIT.

Extension points exported contracts — how you extend this code

AstNode (Interface)
The main trait to go from untyped `SyntaxNode` to a typed ast. The conversion itself has zero runtime cost: ast and syn [147 …
crates/syntax/src/ast.rs
ToDoc (Interface)
(no doc) [9 implementers]
crates/ide_db/src/docs.rs
ToNav (Interface)
(no doc) [10 implementers]
crates/ide/src/navigation_target.rs
ToDef (Interface)
(no doc) [24 implementers]
crates/hir/src/sema/to_def.rs
Upcast (Interface)
(no doc) [5 implementers]
crates/base_db/src/lib.rs
ReconfigureLog (Interface)
Trait similar to Log, but supports direct re-configuration through env_logger-like filter [2 implementers]
crates/elp_log/src/lib.rs
Cli (Interface)
(no doc) [2 implementers]
crates/elp/src/cli.rs
DbApi (Interface)
(no doc) [1 implementers]
crates/eqwalizer/src/lib.rs

Core symbols most depended-on inside this repo

map
called by 619
crates/hir/src/lib.rs
clone
called by 509
crates/ide/src/lib.rs
iter
called by 473
crates/ide_db/src/defs.rs
to_string
called by 412
crates/hir/src/body/pretty.rs
push
called by 262
crates/elp/src/semantic_tokens.rs
kind
called by 239
crates/hir/src/module_data.rs
ok
called by 210
crates/syntax/src/lib.rs
text_range
called by 195
crates/ide_assists/src/handlers/extract_function.rs

Shape

Function 1,969
Method 1,402
Class 618
Enum 180
Interface 36

Languages

Rust100%
TypeScript1%

Modules by API surface

crates/syntax/src/ast/generated/nodes.rs197 symbols
crates/ide/src/handlers/goto_definition.rs161 symbols
crates/hir/src/body/tests.rs114 symbols
crates/ide/src/diagnostics.rs89 symbols
crates/ide_assists/src/handlers/inline_function.rs79 symbols
crates/hir/src/body/tree_print.rs79 symbols
crates/hir/src/sema.rs78 symbols
crates/hir/src/body/lower.rs63 symbols
crates/ide_assists/src/handlers/extract_function.rs60 symbols
crates/ide/src/lib.rs60 symbols
crates/ide/src/rename.rs54 symbols
crates/elp/src/bin/main.rs54 symbols

For agents

$ claude mcp add erlang-language-platform \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact