mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
vim-patch:ca0e9823a1df
runtime(c): Highlight user defined functions
closes: vim/vim#13763
ca0e9823a1
Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
This commit is contained in:
parent
9808a781d3
commit
0c1119ac75
@ -989,6 +989,8 @@ Variable Highlight ~
|
|||||||
*c_no_c99* don't highlight C99 standard items
|
*c_no_c99* don't highlight C99 standard items
|
||||||
*c_no_c11* don't highlight C11 standard items
|
*c_no_c11* don't highlight C11 standard items
|
||||||
*c_no_bsd* don't highlight BSD specific types
|
*c_no_bsd* don't highlight BSD specific types
|
||||||
|
*c_functions* highlight function calls and definitions
|
||||||
|
*c_function_pointers* highlight function pointers definitions
|
||||||
|
|
||||||
When 'foldmethod' is set to "syntax" then `/* */` comments and { } blocks will
|
When 'foldmethod' is set to "syntax" then `/* */` comments and { } blocks will
|
||||||
become a fold. If you don't want comments to become a fold use: >
|
become a fold. If you don't want comments to become a fold use: >
|
||||||
|
@ -444,6 +444,14 @@ syn match cUserLabel display "\I\i*" contained
|
|||||||
syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
||||||
syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
||||||
|
|
||||||
|
if exists("c_functions")
|
||||||
|
syn match cFunction "\<\h\w*\ze\_s*("
|
||||||
|
endif
|
||||||
|
|
||||||
|
if exists("c_function_pointers")
|
||||||
|
syn match cFunctionPointer "\%((\s*\*\s*\)\@<=\h\w*\ze\s*)\_s*(.*)"
|
||||||
|
endif
|
||||||
|
|
||||||
if exists("c_minlines")
|
if exists("c_minlines")
|
||||||
let b:c_minlines = c_minlines
|
let b:c_minlines = c_minlines
|
||||||
else
|
else
|
||||||
@ -513,6 +521,8 @@ hi def link cCppOutSkip cCppOutIf2
|
|||||||
hi def link cCppInElse2 cCppOutIf2
|
hi def link cCppInElse2 cCppOutIf2
|
||||||
hi def link cCppOutIf2 cCppOut
|
hi def link cCppOutIf2 cCppOut
|
||||||
hi def link cCppOut Comment
|
hi def link cCppOut Comment
|
||||||
|
hi def link cFunction Function
|
||||||
|
hi def link cFunctionPointer Function
|
||||||
|
|
||||||
let b:current_syntax = "c"
|
let b:current_syntax = "c"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user