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 Jun 9, 2023
1 parent a0cc7c6 commit 3cb4891
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion queries/bash/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
(regex) @regex.inner

((word) @number.inner
(#match? @number.inner "^[0-9]+$"))
(#lua-match? @number.inner "^[0-9]+$"))

(variable_assignment) @assignment.outer
(variable_assignment name: (_) @assignment.inner @assignment.lhs)
Expand Down
10 changes: 8 additions & 2 deletions 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 All @@ -25,7 +31,7 @@
; leave space after comment marker if there is one
((comment) @comment.inner @comment.outer
(#offset! @comment.inner 0 2 0)
(#match? @comment.outer "# .*"))
(#lua-match? @comment.outer "# .*"))

; else remove everything accept comment marker
((comment) @comment.inner @comment.outer
Expand Down
6 changes: 3 additions & 3 deletions queries/go/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@

(parameter_declaration
name: (identifier)
type: (_) @parameter.inner)
type: (_)) @parameter.inner

(parameter_declaration
name: (identifier) @parameter.inner
type: (_))
name: (identifier)
type: (_)) @parameter.inner

(parameter_list
"," @parameter.outer._start .
Expand Down
2 changes: 1 addition & 1 deletion queries/python/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
; leave space after comment marker if there is one
((comment) @comment.inner @comment.outer
(#offset! @comment.inner 0 2 0)
(#match? @comment.outer "# .*"))
(#lua-match? @comment.outer "# .*"))

; else remove everything accept comment marker
((comment) @comment.inner @comment.outer
Expand Down
2 changes: 1 addition & 1 deletion queries/v/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
; leave space after comment marker if there is one
((comment) @comment.inner @comment.outer
(#offset! @comment.inner 0 3 0)
(#match? @comment.outer "// .*"))
(#lua-match? @comment.outer "// .*"))

; else remove everything accept comment marker
((comment) @comment.inner @comment.outer
Expand Down
2 changes: 1 addition & 1 deletion queries/yaml/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
; leave space after comment marker if there is one
((comment) @comment.inner @comment.outer
(#offset! @comment.inner 0 2 0)
(#match? @comment.outer "# .*"))
(#lua-match? @comment.outer "# .*"))

; else remove everything accept comment marker
((comment) @comment.inner @comment.outer
Expand Down

0 comments on commit 3cb4891

Please sign in to comment.