Skip to content

Commit

Permalink
Add @parameter.outer for Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
theHamsta committed Nov 18, 2020
1 parent a0ccd1f commit d89a6f2
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions queries/rust/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,25 @@
(block (_) @statement.outer)

;; parameter
(parameter) @parameter.inner
(((parameter) @parameter.inner . ","? @_end)
(#make-range! "parameter.outer" @parameter.inner @_end))

(tuple_pattern
(identifier) @parameter.inner)
((tuple_pattern
(identifier) @parameter.inner . ","? @_end)
(#make-range! "parameter.outer" @parameter.inner @_end))

(tuple_struct_pattern
(identifier) @parameter.inner)
((tuple_struct_pattern
(identifier) @parameter.inner . ","? @_end)
(#make-range! "parameter.outer" @parameter.inner @_end))

(closure_parameters
(_) @parameter.inner)
((closure_parameters
(_) @parameter.inner . ","? @_end)
(#make-range! "parameter.outer" @parameter.inner @_end))

(arguments
(_) @parameter.inner)
(((arguments
(_) @parameter.inner . ","? @_end))
(#make-range! "parameter.outer" @parameter.inner @_end))

(meta_arguments
(_) @parameter.inner)
((meta_arguments
(_) @parameter.inner . ","? @_end)
(#make-range! "parameter.outer" @parameter.inner @_end))

0 comments on commit d89a6f2

Please sign in to comment.