Files
zed/crates/languages/src/cpp/textobjects.scm
T
Haojian Wu 895213a94d Support union declarations in C/C++ textobjects.scm (#45308)
Release Notes:

- C/C++: Add `union` declarations to the list of text objects
2025-12-19 17:37:13 -05:00

38 lines
682 B
Scheme

(declaration
declarator: (function_declarator)) @function.around
(function_definition
body: (_
"{"
(_)* @function.inside
"}" )) @function.around
(preproc_function_def
value: (_) @function.inside) @function.around
(comment) @comment.around
(struct_specifier
body: (_
"{"
(_)* @class.inside
"}")) @class.around
(enum_specifier
body: (_
"{"
[(_) ","?]* @class.inside
"}")) @class.around
(union_specifier
body: (_
"{"
(_)* @class.inside
"}")) @class.around
(class_specifier
body: (_
"{"
[(_) ":"? ";"?]* @class.inside
"}"?)) @class.around