diff options
| author | Santos Gallegos <stsewd@protonmail.com> | 2020-08-02 18:03:50 -0500 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2020-08-04 10:09:11 +0200 |
| commit | 124ff3bf5680e746dc4d504f67a1b437fcb50365 (patch) | |
| tree | 7cfc957b65a697790ee53fde0da99eae9fc1b4ee /queries/python/textobjects.scm | |
| parent | Lua: fix @error capture (diff) | |
| download | nvim-treesitter-124ff3bf5680e746dc4d504f67a1b437fcb50365.tar nvim-treesitter-124ff3bf5680e746dc4d504f67a1b437fcb50365.tar.gz nvim-treesitter-124ff3bf5680e746dc4d504f67a1b437fcb50365.tar.bz2 nvim-treesitter-124ff3bf5680e746dc4d504f67a1b437fcb50365.tar.lz nvim-treesitter-124ff3bf5680e746dc4d504f67a1b437fcb50365.tar.xz nvim-treesitter-124ff3bf5680e746dc4d504f67a1b437fcb50365.tar.zst nvim-treesitter-124ff3bf5680e746dc4d504f67a1b437fcb50365.zip | |
Python: update textobjects queries
Diffstat (limited to 'queries/python/textobjects.scm')
| -rw-r--r-- | queries/python/textobjects.scm | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/queries/python/textobjects.scm b/queries/python/textobjects.scm index 9f0d41233..3e800ef07 100644 --- a/queries/python/textobjects.scm +++ b/queries/python/textobjects.scm @@ -1,4 +1,3 @@ - (function_definition body: (block)? @function.inner) @function.outer @@ -33,3 +32,25 @@ (call) @call.outer (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) |
