diff options
| author | Thomas Vigouroux <39092278+vigoux@users.noreply.github.com> | 2020-06-02 21:08:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-02 21:08:17 +0200 |
| commit | 2c7b416441c49ebdb233c98891ece242da2da08a (patch) | |
| tree | 1f30ff6171729796d77e551a9a27c9f45a7a012a /queries/python | |
| parent | Merge pull request #71 from stsewd/fix-exampple (diff) | |
| parent | Update python locals: `list_splat` and `dictionary_splat` define variables as... (diff) | |
| download | nvim-treesitter-2c7b416441c49ebdb233c98891ece242da2da08a.tar nvim-treesitter-2c7b416441c49ebdb233c98891ece242da2da08a.tar.gz nvim-treesitter-2c7b416441c49ebdb233c98891ece242da2da08a.tar.bz2 nvim-treesitter-2c7b416441c49ebdb233c98891ece242da2da08a.tar.lz nvim-treesitter-2c7b416441c49ebdb233c98891ece242da2da08a.tar.xz nvim-treesitter-2c7b416441c49ebdb233c98891ece242da2da08a.tar.zst nvim-treesitter-2c7b416441c49ebdb233c98891ece242da2da08a.zip | |
Merge pull request #73 from theHamsta/python-locals
Update python locals: `list_splat` and `dictionary_splat` define variā¦
Diffstat (limited to 'queries/python')
| -rw-r--r-- | queries/python/locals.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/queries/python/locals.scm b/queries/python/locals.scm index bc33d306b..735271663 100644 --- a/queries/python/locals.scm +++ b/queries/python/locals.scm @@ -14,6 +14,20 @@ parameters: (parameters (identifier) @definition.var)) +; *args parameter +(function_definition + name: (identifier) + parameters: (parameters + (list_splat + (identifier) @definition.var))) + +; **kwargs parameter +(function_definition + name: (identifier) + parameters: (parameters + (dictionary_splat + (identifier) @definition.var))) + ; Function defines function and scope (function_definition name: (identifier) @definition.function) @scope |
