1
0
Files
James Bulman da251e7223 Custom syntax highlighting
For c and quickfix
Function to format the quickfix and location jump lists
Fixed issue with "help" window layouts accessing incorrect variable
2025-09-25 00:04:21 +01:00

33 lines
864 B
VimL

syn clear cTodo
syn clear cType
" Custom keywords
"
syn keyword cStorageClass function export internal global_var thread_var local_persist
syn keyword cOperator cast
" Type highlighting
"
" There are inconsistencies around this due to the horrific declaration syntax of C/C++ and
" trying to capture that inside a regexp statement is near impossible. These are made to mostly
" match the way I format my code.
"
syn match cType "\I\i*\ze\s\+\**\I\i*\s*[=;,\)\[]" " Regular declarations
syn match cType "\I\i*\ze\s\+\**\I\i*(" " Function return types
" Todo notes
"
syn match cTodo "@\I\i*\((\I\i*)\)\=:\?" contained
syn match cNote "\s:\I\i*" contained
" Functions
"
syn match cFunction "\I\i*\ze("
" Contain clusters
"
syn cluster cCommentGroup add=cNote
syn cluster cPreProcGroup add=cFunc,cType
hi def link cFunction Function