Skip to content

Commit fd30a73

Browse files
mattnchrisbra
authored andcommitted
runtime(cpp): recognize C++23 stdfloat types
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>
1 parent 2e7833b commit fd30a73

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

runtime/doc/syntax.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 9.2. Last change: 2026 May 23
1+
*syntax.txt* For Vim version 9.2. Last change: 2026 Jun 01
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1260,6 +1260,7 @@ cpp_no_cpp11 don't highlight C++11 standard items
12601260
cpp_no_cpp14 don't highlight C++14 standard items
12611261
cpp_no_cpp17 don't highlight C++17 standard items
12621262
cpp_no_cpp20 don't highlight C++20 standard items
1263+
cpp_no_cpp23 don't highlight C++23 standard items
12631264

12641265

12651266
CSH *csh.vim* *ft-csh-syntax*

runtime/syntax/cpp.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
" 2024 May 04 by Vim Project fix digit separator in octals and floats
88
" 2026 Jan 06 by Vim Project orphaning announcement
99
" 2026 Jan 08 by Vim Project highlight capital letter prefixes for numbers
10+
" 2026 May 29 by Vim Project add C++23 stdfloat types (#16498)
1011

1112
" quit when a syntax file was already loaded
1213
if exists("b:current_syntax")
@@ -104,6 +105,11 @@ if !exists("cpp_no_cpp20")
104105
syn keyword cppModule import module export
105106
endif
106107

108+
" C++ 23 extensions
109+
if !exists("cpp_no_cpp23")
110+
syn keyword cppType float16_t float32_t float64_t float128_t bfloat16_t
111+
endif
112+
107113
" The minimum and maximum operators in GNU C++
108114
syn match cppMinMax "[<>]?"
109115

0 commit comments

Comments
 (0)