]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(cpp): recognize C++23 stdfloat types
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Mon, 1 Jun 2026 21:15:41 +0000 (21:15 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 1 Jun 2026 21:15:41 +0000 (21:15 +0000)
Add float16_t, float32_t, float64_t, float128_t and bfloat16_t from
<stdfloat> as cppType under a new cpp_no_cpp23 guard.

fixes:  #16498
closes: #20367

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/syntax.txt
runtime/syntax/cpp.vim

index ca5daf1b73413de2e15c211f6bd2493a6c18ed41..e668de970b6b865c72f2740b6ef90868aaaf63dc 100644 (file)
@@ -1,4 +1,4 @@
-*syntax.txt*   For Vim version 9.2.  Last change: 2026 May 23
+*syntax.txt*   For Vim version 9.2.  Last change: 2026 Jun 01
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1260,6 +1260,7 @@ cpp_no_cpp11              don't highlight C++11 standard items
 cpp_no_cpp14           don't highlight C++14 standard items
 cpp_no_cpp17           don't highlight C++17 standard items
 cpp_no_cpp20           don't highlight C++20 standard items
+cpp_no_cpp23           don't highlight C++23 standard items
 
 
 CSH                                            *csh.vim* *ft-csh-syntax*
index 5ea52ec5029c73766f61f9cf94c7d8322a71d2c0..1c725a4bfd87f4d808529924ca9a5ddc649b8bb3 100644 (file)
@@ -7,6 +7,7 @@
 "   2024 May 04 by Vim Project fix digit separator in octals and floats
 "   2026 Jan 06 by Vim Project orphaning announcement
 "   2026 Jan 08 by Vim Project highlight capital letter prefixes for numbers
+"   2026 May 29 by Vim Project add C++23 stdfloat types (#16498)
 
 " quit when a syntax file was already loaded
 if exists("b:current_syntax")
@@ -104,6 +105,11 @@ if !exists("cpp_no_cpp20")
   syn keyword cppModule                import module export
 endif
 
+" C++ 23 extensions
+if !exists("cpp_no_cpp23")
+  syn keyword cppType          float16_t float32_t float64_t float128_t bfloat16_t
+endif
+
 " The minimum and maximum operators in GNU C++
 syn match cppMinMax "[<>]?"