diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2020-05-15 18:49:21 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2020-05-16 19:32:02 +0200 |
| commit | a5c50262d905037ca69c80debb46aba3cc381201 (patch) | |
| tree | 5a67f08c348ee1b4c32a9eb24cb746fe790ba4bb /queries/python | |
| parent | Merge pull request #53 from vigoux/c-queries (diff) | |
| download | nvim-treesitter-a5c50262d905037ca69c80debb46aba3cc381201.tar nvim-treesitter-a5c50262d905037ca69c80debb46aba3cc381201.tar.gz nvim-treesitter-a5c50262d905037ca69c80debb46aba3cc381201.tar.bz2 nvim-treesitter-a5c50262d905037ca69c80debb46aba3cc381201.tar.lz nvim-treesitter-a5c50262d905037ca69c80debb46aba3cc381201.tar.xz nvim-treesitter-a5c50262d905037ca69c80debb46aba3cc381201.tar.zst nvim-treesitter-a5c50262d905037ca69c80debb46aba3cc381201.zip | |
Add python locals.scm
Diffstat (limited to 'queries/python')
| -rw-r--r-- | queries/python/locals.scm | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/queries/python/locals.scm b/queries/python/locals.scm new file mode 100644 index 000000000..763d1b77d --- /dev/null +++ b/queries/python/locals.scm @@ -0,0 +1,65 @@ +;;; Programm structure +(module) @scope + +(class_definition + body: (block + (expression_statement + (assignment + left: (expression_list + (identifier) @definition.associated))))) @scope + +; Function with parameters, defines parameters +(function_definition + name: (identifier) + parameters: (parameters + (identifier) @definition.var)) + +; Function defines function and scope +(function_definition + name: (identifier) @definition.function) @scope + +(class_definition + name: (identifier) @definition.type) @scope |
