diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-24 22:41:44 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-27 09:21:32 -0400 |
commit | 841bc219d27a37131cee8b4f36bffbbbda860d9f (patch) | |
tree | cf8150553f1b7368bd54beeb103685f503ef4778 /runtime/syntax/cpp.vim | |
parent | 8aa817bbb3e996e4247b0e1a2288b5f2acfc8299 (diff) | |
download | rneovim-841bc219d27a37131cee8b4f36bffbbbda860d9f.tar.gz rneovim-841bc219d27a37131cee8b4f36bffbbbda860d9f.tar.bz2 rneovim-841bc219d27a37131cee8b4f36bffbbbda860d9f.zip |
vim-patch:95a9dd1efc5a
Update runtime files.
https://github.com/vim/vim/commit/95a9dd1efc5ae3221865f4970053a5708557e682
Diffstat (limited to 'runtime/syntax/cpp.vim')
-rw-r--r-- | runtime/syntax/cpp.vim | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index 9cb0860e84..53b6a513f2 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -2,7 +2,7 @@ " Language: C++ " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> -" Last Change: 2017 Jun 05 +" Last Change: 2019 Dec 18 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -42,6 +42,8 @@ if !exists("cpp_no_cpp11") syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell + syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1 + syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$" endif " C++ 14 extensions @@ -53,6 +55,21 @@ if !exists("cpp_no_cpp14") syn case match endif +" C++ 20 extensions +if !exists("cpp_no_cpp20") + syn keyword cppStatement co_await co_return co_yield requires + syn keyword cppStorageClass consteval constinit + syn keyword cppStructure concept + syn keyword cppType char8_t + syn keyword cppModule import module export +endif + +" C++ 17 extensions +if !exists("cpp_no_cpp17") + syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1 + syn match cppCast "\<reinterpret_pointer_cast\s*$" +endif + " The minimum and maximum operators in GNU C++ syn match cppMinMax "[<>]?" @@ -71,6 +88,7 @@ hi def link cppConstant Constant hi def link cppRawStringDelimiter Delimiter hi def link cppRawString String hi def link cppNumber Number +hi def link cppModule Include let b:current_syntax = "cpp" |