Skip to content

Commit

Permalink
Update tree-sitter queries to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
meain authored Oct 27, 2023
1 parent 8180681 commit bd2a4b6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
8 changes: 7 additions & 1 deletion queries/fish/textobjects.scm
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
(function_definition) @function.outer
;; assignment
(command
name: (word) @_command
argument: (word) @_varname @assignment.lhs @assignment.inner
argument: (_)* @assignment.rhs
(#not-lua-match? @_varname "[-].*")
(#eq? @_command "set")) @assignment.outer

(command
name: (word) @_name
Expand Down
13 changes: 6 additions & 7 deletions queries/rust/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,12 @@
. (_) @parameter.inner @parameter.outer._start . ","? @parameter.outer._end)
)

;; Disabled as not available in upstream language grammar repo (will need rust lang update)
;; ((token_tree
;; "," @parameter.outer._start . (_) @parameter.inner @parameter.outer._end)
;; )
;; ((token_tree
;; . (_) @parameter.inner @parameter.outer._start . ","? @parameter.outer._end)
;; )
((token_tree
"," @parameter.outer._start . (_) @parameter.inner @parameter.outer._end)
)
((token_tree
. (_) @parameter.inner @parameter.outer._start . ","? @parameter.outer._end)
)

(scoped_use_list
list: (use_list "," @parameter.outer._start . (_) @parameter.inner @parameter.outer._end
Expand Down

0 comments on commit bd2a4b6

Please sign in to comment.