aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/java.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax/java.vim')
-rw-r--r--runtime/syntax/java.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim
index bbef266c34..800faa40a0 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 <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