From 954d4969c991be1a758c121be6f7d811b5e5cea1 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 18 Jan 2025 10:58:14 +0100 Subject: [PATCH] vim-patch:e064051: runtime(c): add new constexpr keyword to syntax file (C23) closes: vim/vim#16471 https://github.com/vim/vim/commit/e06405181a6189aa56e917c1a7e5090a33b07a8a Co-authored-by: Doug Kearns --- runtime/syntax/c.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index eb56239f3d..68b6778c73 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: The Vim Project -" Last Change: 2025 Jan 15 +" Last Change: 2025 Jan 18 " Former Maintainer: Bram Moolenaar " Quit when a (custom) syntax file was already loaded @@ -318,6 +318,9 @@ syn keyword cStorageClass static register auto volatile extern const if !exists("c_no_c99") && !s:in_cpp_family syn keyword cStorageClass inline restrict endif +if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp11")) + syn keyword cStorageClass constexpr +endif if !exists("c_no_c11") syn keyword cStorageClass _Alignas alignas syn keyword cOperator _Alignof alignof