Support union declarations in C/C++ textobjects.scm (#45308)

Haojian Wu created

Release Notes:

- C/C++: Add `union` declarations to the list of text objects

Change summary

crates/languages/src/c/textobjects.scm   | 6 ++++++
crates/languages/src/cpp/textobjects.scm | 6 ++++++
2 files changed, 12 insertions(+)

Detailed changes

crates/languages/src/cpp/textobjects.scm 🔗

@@ -24,6 +24,12 @@
         [(_) ","?]* @class.inside
         "}")) @class.around
 
+(union_specifier
+    body: (_
+        "{"
+        (_)* @class.inside
+        "}")) @class.around
+
 (class_specifier
   body: (_
       "{"