From 929f03fa8c6263044496b7c92af4058ac1c28ced Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 24 Mar 2026 08:01:43 +0800 Subject: [PATCH] vim-patch:c9eaff0: runtime(java): Make changes for JDK 26 (#38452) 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: vim/vim#19793 https://github.com/vim/vim/commit/c9eaff0a8ac7d8c38878361b53343348d93afff5 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com> --- runtime/doc/syntax.txt | 4 ++-- runtime/syntax/java.vim | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 3ddd567969..0c15693c5e 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1795,11 +1795,11 @@ cycles for such a feature to become either integrated into the platform or withdrawn from this effort. To cater for early adopters, there is optional support in Vim for syntax related preview features that are implemented. You can request it by specifying a list of preview feature numbers as follows: > - :let g:java_syntax_previews = [507] + :let g:java_syntax_previews = [530] The supported JEP numbers are to be drawn from this table: `430`: String Templates [JDK 21] - `507`: Primitive types in Patterns, instanceof, and switch + `530`: Primitive types in Patterns, instanceof, and switch Note that as soon as the particular preview feature will have been integrated into the Java platform, its entry will be removed from the table and related diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index bc874904f6..ee2b06ffd9 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -3,7 +3,7 @@ " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Former Maintainer: Claudio Fleiner " Repository: https://github.com/zzzyxwvut/java-vim.git -" Last Change: 2026 Feb 06 +" Last Change: 2026 Mar 22 " Please check ":help java.vim" for comments on some of the options " available. @@ -381,7 +381,7 @@ endif exec 'syn match javaUserLabel "^\s*\<\K\k*\>\%(\\)\@' . s:ff.Peek('7', '') . '" matchgroup=NONE end=":\|->" contains=javaBoolean,javaNumber,javaCharacter,javaString,javaConstant,@javaClasses,javaGenerics,javaType,javaLabelDefault,javaLabelVarType,javaLabelWhenClause else syn region javaLabelRegion transparent matchgroup=javaLabel start="\" matchgroup=NONE end=":\|->" contains=javaLabelCastType,javaLabelNumber,javaCharacter,javaString,javaConstant,@javaClasses,javaGenerics,javaLabelDefault,javaLabelVarType,javaLabelWhenClause