on master help sign in
add textobject queries for erlang
7a91474Michael Davis
book/src/generated/lang-support.md+1−1
@@ -18,7 +18,7 @@
18| elixir | ✓ | | | `elixir-ls` |
18| elixir | ✓ | | | `elixir-ls` |
19| elm | ✓ | | | `elm-language-server` |
19| elm | ✓ | | | `elm-language-server` |
20| erb | ✓ | | | |
20| erb | ✓ | | | |
21−| erlang | ✓ | | | `erlang_ls` |
21+| erlang | ✓ | ✓ | | `erlang_ls` |
22| fish | ✓ | ✓ | ✓ | |
22| fish | ✓ | ✓ | ✓ | |
23| gdscript | ✓ | | ✓ | |
23| gdscript | ✓ | | ✓ | |
24| git-attributes | ✓ | | | |
24| git-attributes | ✓ | | | |
languages.toml+1−1
@@ -1049,7 +1049,7 @@ language-server = { command = "erlang_ls" }
1049
1049
1050[[grammar]]
1050[[grammar]]
1051name = "erlang"
1051name = "erlang"
1052−source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "481e7f8ddf27f07a47d1531b6e2b154b89ece31d" }
1052+source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "c0ebc82600caaf4339f2b00691f958e9df97c065" }
1053
1053
1054[[language]]
1054[[language]]
1055name = "kotlin"
1055name = "kotlin"
runtime/queries/erlang/highlights.scm+1−1
@@ -58,7 +58,7 @@
58 (#eq? @keyword "(spec|callback)"))
58 (#eq? @keyword "(spec|callback)"))
59
59
60; Functions
60; Functions
61−(function name: (atom) @function)
61+(function_clause name: (atom) @function)
62(call module: (atom) @module)
62(call module: (atom) @module)
63(call function: (atom) @function)
63(call function: (atom) @function)
64(stab_clause name: (atom) @function)
64(stab_clause name: (atom) @function)
runtime/queries/erlang/textobjects.scmnew file+8
@@ -0,0 +1,8 @@
1+(function_clause
2+ pattern: (arguments (_)? @parameter.inside)
3+ body: (_) @function.inside) @function.around
4+
5+(anonymous_function
6+ (stab_clause body: (_) @function.inside)) @function.around
7+
8+(comment (comment_content) @comment.inside) @comment.around