Summary
Add Erlang support via tree-sitter + LSP enrichment, complementing existing Elixir support in the BEAM ecosystem.
Tooling
| Component |
Tool |
Notes |
| Tree-sitter grammar |
tree-sitter-erlang |
WhatsApp/Meta-maintained, high quality |
| LSP server |
erlang_ls |
Active, well-maintained |
| Alternative LSP |
ELP |
WhatsApp-backed, newer |
| SCIP indexer |
None |
N/A |
What to implement
Language notes
- Functions are identified by
Module:Function/Arity (e.g., lists:map/2)
- Pattern-matching clauses: one function name can have multiple clause bodies — use first clause's line as start, last clause's end
- Header files (
.hrl) contain macros and record definitions — should be indexed
- OTP behaviours (
gen_server, gen_statem, supervisor) define callback relationships
Context
Complements existing Elixir support. Erlang and Elixir share the BEAM VM and often co-exist in projects. Many Elixir projects call into Erlang libraries.
Summary
Add Erlang support via tree-sitter + LSP enrichment, complementing existing Elixir support in the BEAM ecosystem.
Tooling
tree-sitter-erlangerlang_lsWhat to implement
tree-sitter-erlangas an npm dependencysrc/indexer/extractors/erlang.ts:-module(Name)as module symbolfunction_name(Args) -> Bodydeclarations as function symbols (include arity in signature)-record(Name, {Fields})as type/struct symbols-typeand-specdeclarationsfoo(X)and remotemodule:foo(X)-import(Module, [Fun/Arity])and-include("header.hrl")as imports-behaviour(gen_server)callback implementations as relationshipserlanginSourceIndexStageEXTRACTORS map andParserPoolLANG_PACKAGESerlang_lstosrc/indexer/lsp/registry.ts:{ command: 'erlang_ls', args: [] }.erl,.hrlto walkertests/fixtures/erlang/Language notes
Module:Function/Arity(e.g.,lists:map/2).hrl) contain macros and record definitions — should be indexedgen_server,gen_statem,supervisor) define callback relationshipsContext
Complements existing Elixir support. Erlang and Elixir share the BEAM VM and often co-exist in projects. Many Elixir projects call into Erlang libraries.