vim-patch:2307945: runtime(java): Optionally recognise all primitive constants in _switch-case_ labels

Define "g:java_syntax_previews" and include number 455 in
its list to enable this recognition:
------------------------------------------------------------
	let g:java_syntax_previews = [455]
------------------------------------------------------------

Reference:
https://openjdk.org/jeps/455

closes: vim/vim#15698

23079450a8

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
This commit is contained in:
Christian Clason
2024-09-19 18:56:19 +02:00
parent 674c1aac11
commit f5883e0d45
2 changed files with 15 additions and 8 deletions

View File

@@ -1704,10 +1704,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 = [430]
:let g:java_syntax_previews = [455]
The supported JEP numbers are to be drawn from this table:
`430`: String Templates [JDK 21]
`455`: 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