on master help sign in
update tree-sitter-erlang

changes: - typed fields within records which do not declare a default value are now correctly highlighted as record fields - the EEP49 'maybe' form is now parsed - fixes for highlights for 'begin' and 'after' tokens

commite2a50711d5ca1029b28b1ddaeb3b2989ade7d651 authorMichael Davis <mcarsondavis@gmail.com> dateWed 2 Mar 2022, 08:54 (5 years ago) parentf2dd3d4
3 files changed+7−6
book/src/generated/lang-support.md+1−1 languages.toml+4−3 runtime/queries/erlang/highlights.scm+2−2
book/src/generated/lang-support.md+1−1
@@ -11,7 +11,7 @@
1111| dockerfile | ✓ | | | `docker-langserver` |
1212| elixir | ✓ | | | `elixir-ls` |
1313| elm | ✓ | | | `elm-language-server` |
14−| erlang | ✓ | | | |
14+| erlang | ✓ | | | `erlang_ls` |
1515| fish | ✓ | ✓ | ✓ | |
1616| git-commit | ✓ | | | |
1717| git-config | ✓ | | | |
languages.toml+4−3
@@ -939,15 +939,16 @@ source = { git = "https://github.com/jaredramirez/tree-sitter-rescript", rev = "
939939[[language]]
940940name = "erlang"
941941scope = "source.erlang"
942−injection-regex = "^erl$"
943−file-types = ["erl", "hrl", "app", "rebar.config"]
942+injection-regex = "erl(ang)?"
943+file-types = ["erl", "hrl", "app", "rebar.config", "rebar.lock"]
944944roots = ["rebar.config"]
945945comment-token = "%%"
946946indent = { tab-width = 4, unit = " " }
947+language-server = { command = "erlang_ls" }
947948
948949[[grammar]]
949950name = "erlang"
950−source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "86985bde399c5f40b00bc75f7ab70a6c69a5f9c3" }
951+source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "1e81393b8f0a81b35ff1679a9420fafbd2cf3511" }
951952
952953[[language]]
953954name = "kotlin"
runtime/queries/erlang/highlights.scm+2−2
@@ -22,7 +22,7 @@
2222 (tuple
2323 (binary_operator
2424 left: (atom) @variable.other.member
25− operator: "="))
25+ operator: ["=" "::"]))
2626 (tuple
2727 (binary_operator
2828 left:
@@ -74,7 +74,7 @@
7474 @keyword
7575 "^(define|export|export_type|include|include_lib|ifdef|ifndef|if|elif|else|endif|vsn|on_load|behaviour|record|file|type|opaque|spec)$"))
7676
77−["case" "fun" "if" "of" "when" "end" "receive" "try" "catch" "after"] @keyword
77+["case" "fun" "if" "of" "when" "end" "receive" "try" "catch" "after" "begin" "maybe"] @keyword
7878
7979; Operators
8080(binary_operator