mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 21:10:15 -04:00
feat(c): mention how to highlight K&R functions
This commit is contained in:
parent
8fbc841df8
commit
e0f4782978
1 changed files with 23 additions and 0 deletions
|
|
@ -244,6 +244,29 @@
|
|||
(parameter_declaration
|
||||
declarator: (pointer_declarator) @parameter)
|
||||
|
||||
; K&R functions
|
||||
; To enable support for K&R functions,
|
||||
; add the following lines to your own query config and uncomment them.
|
||||
; They are commented out as they'll conflict with C++
|
||||
; Note that you'll need to have `; extends` at the top of your query file.
|
||||
;
|
||||
; (parameter_list (identifier) @parameter)
|
||||
;
|
||||
; (function_definition
|
||||
; declarator: _
|
||||
; (declaration
|
||||
; declarator: (identifier) @parameter))
|
||||
;
|
||||
; (function_definition
|
||||
; declarator: _
|
||||
; (declaration
|
||||
; declarator: (array_declarator) @parameter))
|
||||
;
|
||||
; (function_definition
|
||||
; declarator: _
|
||||
; (declaration
|
||||
; declarator: (pointer_declarator) @parameter))
|
||||
|
||||
(preproc_params (identifier) @parameter)
|
||||
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue