add textobject queries for erlang
This commit is contained in:
parent
9f8df05d96
commit
7a9147489e
4 changed files with 11 additions and 3 deletions
|
@ -18,7 +18,7 @@
|
||||||
| elixir | ✓ | | | `elixir-ls` |
|
| elixir | ✓ | | | `elixir-ls` |
|
||||||
| elm | ✓ | | | `elm-language-server` |
|
| elm | ✓ | | | `elm-language-server` |
|
||||||
| erb | ✓ | | | |
|
| erb | ✓ | | | |
|
||||||
| erlang | ✓ | | | `erlang_ls` |
|
| erlang | ✓ | ✓ | | `erlang_ls` |
|
||||||
| fish | ✓ | ✓ | ✓ | |
|
| fish | ✓ | ✓ | ✓ | |
|
||||||
| gdscript | ✓ | | ✓ | |
|
| gdscript | ✓ | | ✓ | |
|
||||||
| git-attributes | ✓ | | | |
|
| git-attributes | ✓ | | | |
|
||||||
|
|
|
@ -1049,7 +1049,7 @@ language-server = { command = "erlang_ls" }
|
||||||
|
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "erlang"
|
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]]
|
[[language]]
|
||||||
name = "kotlin"
|
name = "kotlin"
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
(#eq? @keyword "(spec|callback)"))
|
(#eq? @keyword "(spec|callback)"))
|
||||||
|
|
||||||
; Functions
|
; Functions
|
||||||
(function name: (atom) @function)
|
(function_clause name: (atom) @function)
|
||||||
(call module: (atom) @module)
|
(call module: (atom) @module)
|
||||||
(call function: (atom) @function)
|
(call function: (atom) @function)
|
||||||
(stab_clause name: (atom) @function)
|
(stab_clause name: (atom) @function)
|
||||||
|
|
8
runtime/queries/erlang/textobjects.scm
Normal file
8
runtime/queries/erlang/textobjects.scm
Normal 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
|
Loading…
Add table
Reference in a new issue