diff --git a/crates/languages/src/cpp/highlights.scm b/crates/languages/src/cpp/highlights.scm index 42ac231b0efa343f37c33eb6005e504e1151f85d..234605409c16a97fa07f126cb79dbd3a1043202d 100644 --- a/crates/languages/src/cpp/highlights.scm +++ b/crates/languages/src/cpp/highlights.scm @@ -93,8 +93,17 @@ type: (primitive_type) @type.builtin (sized_type_specifier) @type.builtin +; GNU __attribute__ +(attribute_specifier) @attribute +(attribute_specifier + (argument_list + (identifier) @attribute)) + +; C++11 [[attributes]] +(attribute + prefix: (identifier) @attribute) (attribute - name: (identifier) @attribute) + name: (identifier) @attribute) ((identifier) @constant.builtin (#match? @constant.builtin "^_*[A-Z][A-Z\\d_]*$"))