Something went wrong. Try again.
a few hacks on top of zed
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290(identifier) @variable(field_identifier) @property(namespace_identifier) @namespace
(concept_definition name: (identifier) @concept)
(requires_clause constraint: (template_type name: (type_identifier) @concept))
(module_name (identifier) @module)
(module_declaration name: (module_name (identifier) @module))
(import_declaration name: (module_name (identifier) @module))
(import_declaration partition: (module_partition (module_name (identifier) @module)))
(call_expression function: (qualified_identifier name: (identifier) @function))
(call_expression (qualified_identifier (identifier) @function.call))
(call_expression (qualified_identifier (qualified_identifier (identifier) @function.call)))
(call_expression (qualified_identifier (qualified_identifier (qualified_identifier (identifier) @function.call))))
((qualified_identifier (qualified_identifier (qualified_identifier (qualified_identifier (identifier) @function.call)))) @_parent (#has-ancestor? @_parent call_expression))
(call_expression function: (identifier) @function)
(call_expression function: (field_expression field: (field_identifier) @function))
(preproc_function_def name: (identifier) @function.special)
(template_function name: (identifier) @function)
(template_method name: (field_identifier) @function)
(function_declarator declarator: (identifier) @function)
(function_declarator declarator: (qualified_identifier name: (identifier) @function))
(function_declarator declarator: (field_identifier) @function)
(operator_name (identifier)? @operator) @function
(operator_name "<=>" @operator.spaceship)
(destructor_name (identifier) @function)
((namespace_identifier) @type (#match? @type "^[A-Z]"))
(auto) @type(type_identifier) @typetype: (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)
((identifier) @constant.builtin (#match? @constant.builtin "^_*[A-Z][A-Z\\d_]*$"))
(statement_identifier) @label(this) @variable.builtin("static_assert") @function.builtin
[ "alignas" "alignof" "class" "concept" "consteval" "constexpr" "constinit" "decltype" "delete" "enum" "explicit" "export" "extern" "final" "friend" "import" "inline" "module" "namespace" "new" "noexcept" "operator" "override" "private" "protected" "public" "requires" "sizeof" "struct" "template" "thread_local" "typedef" "typename" "union" "using" "virtual" (storage_class_specifier) (type_qualifier)] @keyword
[ "break" "case" "catch" "co_await" "co_return" "co_yield" "continue" "default" "do" "else" "for" "goto" "if" "return" "switch" "throw" "try" "while"] @keyword.control
[ "#define" "#elif" "#elifdef" "#elifndef" "#else" "#endif" "#if" "#ifdef" "#ifndef" "#include" (preproc_directive)] @preproc
(comment) @comment
[ (true) (false)] @boolean
[ (null) ("nullptr")] @constant.builtin
(number_literal) @number
[ (string_literal) (system_lib_string) (char_literal) (raw_string_literal)] @string
(escape_sequence) @string.escape
[ "," ":" "::" ";" (raw_string_delimiter)] @punctuation.delimiter
[ "{" "}" "(" ")" "[" "]"] @punctuation.bracket
[ "." ".*" "->*" "~" "-" "--" "-=" "->" "=" "!" "!=" "|" "|=" "||" "^" "^=" "&" "&=" "&&" "+" "++" "+=" "*" "*=" "/" "/=" "%" "%=" "<<" "<<=" ">>" ">>=" "<" "==" ">" "<=" ">=" "?" "and" "and_eq" "bitand" "bitor" "compl" "not" "not_eq" "or" "or_eq" "xor" "xor_eq"] @operator
"<=>" @operator.spaceship
(binary_expression operator: "<=>" @operator.spaceship)
(conditional_expression ":" @operator)(user_defined_literal (literal_suffix) @operator)