mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
runtime(java): Optionally recognise _module_ import declarations
Define "g:java_syntax_previews" and include number 476 in its list to enable this recognition: ------------------------------------------------------------ let g:java_syntax_previews = [476] ------------------------------------------------------------ Reference: https://openjdk.org/jeps/476 closes: #15709 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
35699f1749
commit
50423ab808
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com>
|
||||
" Former Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" Repository: https://github.com/zzzyxwvut/java-vim.git
|
||||
" Last Change: 2024 Sep 18
|
||||
" Last Change: 2024 Sep 19
|
||||
|
||||
" Please check :help java.vim for comments on some of the options available.
|
||||
|
||||
@@ -92,6 +92,13 @@ syn keyword javaTypedef this super
|
||||
syn keyword javaOperator new instanceof
|
||||
syn match javaOperator "\<var\>\%(\s*(\)\@!"
|
||||
|
||||
if s:ff.IsRequestedPreviewFeature(476)
|
||||
" Module imports can be used in any source file.
|
||||
syn match javaExternal "\<import\s\+module\>" contains=javaModuleImport
|
||||
syn keyword javaModuleImport contained module
|
||||
hi def link javaModuleImport Statement
|
||||
endif
|
||||
|
||||
" Since the yield statement, which could take a parenthesised operand,
|
||||
" and _qualified_ yield methods get along within the switch block
|
||||
" (JLS-17, §3.8), it seems futile to make a region definition for this
|
||||
|
Reference in New Issue
Block a user