aboutsummaryrefslogtreecommitdiffstats
path: root/queries/c/textobjects.scm
blob: 7b59d51236063dca684e71b6cf9929c50a2bd3c5 (plain) (blame)
1
2
3
4
5
6
7
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