mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
Python: update textobjects queries
This commit is contained in:
parent
32c19ec1e8
commit
124ff3bf56
1 changed files with 22 additions and 1 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(function_definition
|
(function_definition
|
||||||
body: (block)? @function.inner) @function.outer
|
body: (block)? @function.inner) @function.outer
|
||||||
|
|
||||||
|
|
@ -33,3 +32,25 @@
|
||||||
|
|
||||||
(call) @call.outer
|
(call) @call.outer
|
||||||
(call (_) @call.inner)
|
(call (_) @call.inner)
|
||||||
|
|
||||||
|
;; Parameters
|
||||||
|
(parameters
|
||||||
|
[(identifier)
|
||||||
|
(tuple)
|
||||||
|
(typed_parameter)
|
||||||
|
(default_parameter)
|
||||||
|
(typed_default_parameter)
|
||||||
|
(list_splat)
|
||||||
|
(dictionary_splat)] @parameter.inner)
|
||||||
|
|
||||||
|
(lambda_parameters
|
||||||
|
[(identifier)
|
||||||
|
(tuple)
|
||||||
|
(typed_parameter)
|
||||||
|
(default_parameter)
|
||||||
|
(typed_default_parameter)
|
||||||
|
(list_splat)
|
||||||
|
(dictionary_splat)] @parameter.inner)
|
||||||
|
|
||||||
|
; TODO: exclude comments using the future negate syntax from tree-sitter
|
||||||
|
(argument_list (_) @parameter.inner)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue