Skip to content

Commit 0357d5d

Browse files
sbeyermattn
authored andcommitted
Add C++20 extensions for cpp.vim
1 parent 432b2fc commit 0357d5d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

syntax/cpp.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ if !exists("cpp_no_cpp14")
5353
syn case match
5454
endif
5555

56+
" C++ 20 extensions
57+
if !exists("cpp_no_cpp20")
58+
syn keyword cppStatement co_await co_return co_yield requires
59+
syn keyword cppStorageClass consteval constinit
60+
syn keyword cppStructure concept
61+
syn keyword cppType char8_t
62+
syn keyword cppModule import module export
63+
endif
64+
5665
" The minimum and maximum operators in GNU C++
5766
syn match cppMinMax "[<>]?"
5867

@@ -71,6 +80,7 @@ hi def link cppConstant Constant
7180
hi def link cppRawStringDelimiter Delimiter
7281
hi def link cppRawString String
7382
hi def link cppNumber Number
83+
hi def link cppModule Include
7484

7585
let b:current_syntax = "cpp"
7686

0 commit comments

Comments
 (0)