Skip to content

Commit c9eaff0

Browse files
zzzyxwvutchrisbra
authored andcommitted
runtime(java): Make changes for JDK 26
Reintroduce supported syntax-preview-feature numbers 455, 488, and 507 as _a new number_ 530. Reference: https://openjdk.org/jeps/530 (Primitive Types in Patterns etc.) closes: #19793 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 8c116bb commit c9eaff0

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

runtime/doc/syntax.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 9.2. Last change: 2026 Feb 14
1+
*syntax.txt* For Vim version 9.2. Last change: 2026 Mar 22
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2285,11 +2285,11 @@ cycles for such a feature to become either integrated into the platform or
22852285
withdrawn from this effort. To cater for early adopters, there is optional
22862286
support in Vim for syntax related preview features that are implemented. You
22872287
can request it by specifying a list of preview feature numbers as follows: >
2288-
:let g:java_syntax_previews = [507]
2288+
:let g:java_syntax_previews = [530]
22892289
22902290
The supported JEP numbers are to be drawn from this table:
22912291
`430`: String Templates [JDK 21]
2292-
`507`: Primitive types in Patterns, instanceof, and switch
2292+
`530`: Primitive types in Patterns, instanceof, and switch
22932293

22942294
Note that as soon as the particular preview feature will have been integrated
22952295
into the Java platform, its entry will be removed from the table and related

runtime/syntax/java.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com>
44
" Former Maintainer: Claudio Fleiner <claudio@fleiner.com>
55
" Repository: https://github.com/zzzyxwvut/java-vim.git
6-
" Last Change: 2026 Feb 06
6+
" Last Change: 2026 Mar 22
77

88
" Please check ":help java.vim" for comments on some of the options
99
" available.
@@ -381,7 +381,7 @@ endif
381381

382382
exec 'syn match javaUserLabel "^\s*\<\K\k*\>\%(\<default\>\)\@' . s:ff.Peek('7', '') . '<!\s*::\@!"he=e-1'
383383

384-
if s:ff.IsAnyRequestedPreviewFeatureOf([455, 488, 507])
384+
if s:ff.IsAnyRequestedPreviewFeatureOf([455, 488, 507, 530])
385385
syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" matchgroup=NONE end=":\|->" contains=javaBoolean,javaNumber,javaCharacter,javaString,javaConstant,@javaClasses,javaGenerics,javaType,javaLabelDefault,javaLabelVarType,javaLabelWhenClause
386386
else
387387
syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" matchgroup=NONE end=":\|->" contains=javaLabelCastType,javaLabelNumber,javaCharacter,javaString,javaConstant,@javaClasses,javaGenerics,javaLabelDefault,javaLabelVarType,javaLabelWhenClause

runtime/syntax/testdir/dumps/java_previews_455_00.dump

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

runtime/syntax/testdir/input/java_previews_455.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// VIM_TEST_SETUP let g:java_syntax_previews = [455, 488, 507]
1+
// VIM_TEST_SETUP let g:java_syntax_previews = [455, 488, 507, 530]
22

33

44

0 commit comments

Comments
 (0)