diff options
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/c/textobjects.scm | 8 | ||||
| -rw-r--r-- | queries/python/textobjects.scm | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/queries/c/textobjects.scm b/queries/c/textobjects.scm new file mode 100644 index 00000000..7b59d512 --- /dev/null +++ b/queries/c/textobjects.scm @@ -0,0 +1,8 @@ +;; TODO: supported by official Tree-sitter if (_)* is more than one node +;; Neovim: will only match if (_) is exactly one node +;(function_definition + ;body: (compound_statement + ;("{" (_)* @function.inner "}"))?) @function.outer + +(function_definition + body: (compound_statement) @function.inner) @function.outer diff --git a/queries/python/textobjects.scm b/queries/python/textobjects.scm new file mode 100644 index 00000000..4c030df7 --- /dev/null +++ b/queries/python/textobjects.scm @@ -0,0 +1,3 @@ + +(function_definition + body: (block)? @function.inner) @function.outer |
