diff --git a/queries/fish/textobjects.scm b/queries/fish/textobjects.scm index 525ae35..40c59be 100644 --- a/queries/fish/textobjects.scm +++ b/queries/fish/textobjects.scm @@ -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 diff --git a/queries/rust/textobjects.scm b/queries/rust/textobjects.scm index 7ec5f7d..5c140e0 100644 --- a/queries/rust/textobjects.scm +++ b/queries/rust/textobjects.scm @@ -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