add textobject queries for erlang

This commit is contained in:
Michael Davis 2022-06-01 18:40:05 -05:00 committed by Blaž Hrastnik
parent 9f8df05d96
commit 7a9147489e
4 changed files with 11 additions and 3 deletions

View file

@ -18,7 +18,7 @@
| elixir | ✓ | | | `elixir-ls` |
| elm | ✓ | | | `elm-language-server` |
| erb | ✓ | | | |
| erlang | ✓ | | | `erlang_ls` |
| erlang | ✓ | | | `erlang_ls` |
| fish | ✓ | ✓ | ✓ | |
| gdscript | ✓ | | ✓ | |
| git-attributes | ✓ | | | |

View file

@ -1049,7 +1049,7 @@ language-server = { command = "erlang_ls" }
[[grammar]]
name = "erlang"
source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "481e7f8ddf27f07a47d1531b6e2b154b89ece31d" }
source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "c0ebc82600caaf4339f2b00691f958e9df97c065" }
[[language]]
name = "kotlin"

View file

@ -58,7 +58,7 @@
(#eq? @keyword "(spec|callback)"))
; Functions
(function name: (atom) @function)
(function_clause name: (atom) @function)
(call module: (atom) @module)
(call function: (atom) @function)
(stab_clause name: (atom) @function)

View file

@ -0,0 +1,8 @@
(function_clause
pattern: (arguments (_)? @parameter.inside)
body: (_) @function.inside) @function.around
(anonymous_function
(stab_clause body: (_) @function.inside)) @function.around
(comment (comment_content) @comment.inside) @comment.around