mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(c): highlight parenthesized function pointer decl identifiers as @function
This commit is contained in:
parent
b0338a0565
commit
b9ed96bb6f
1 changed files with 6 additions and 1 deletions
|
|
@ -130,7 +130,6 @@
|
|||
|
||||
[
|
||||
(type_identifier)
|
||||
(sized_type_specifier)
|
||||
(type_descriptor)
|
||||
] @type
|
||||
|
||||
|
|
@ -146,6 +145,8 @@
|
|||
|
||||
(primitive_type) @type.builtin
|
||||
|
||||
(sized_type_specifier _ @type.builtin type: _)
|
||||
|
||||
((identifier) @constant
|
||||
(#lua-match? @constant "^[A-Z][A-Z0-9_]+$"))
|
||||
(enumerator
|
||||
|
|
@ -171,6 +172,10 @@
|
|||
field: (field_identifier) @function.call))
|
||||
(function_declarator
|
||||
declarator: (identifier) @function)
|
||||
(function_declarator
|
||||
declarator: (parenthesized_declarator
|
||||
(pointer_declarator
|
||||
declarator: (field_identifier) @function)))
|
||||
(preproc_function_def
|
||||
name: (identifier) @function.macro)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue