0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

runtime(java): Reference a modern syntax item generator for type names

And generalise the sourcing of "javaid.vim" for Java
buffers.

Resolves zzzyxwvut/java-vim#10.
closes: #17411

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Aliaksei Budavei 2025-05-31 12:25:15 +02:00 committed by Christian Brabandt
parent 8cc6d8b187
commit 055cca88c4
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
3 changed files with 8 additions and 13 deletions

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2025 May 21 *syntax.txt* For Vim version 9.1. Last change: 2025 May 31
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -2067,13 +2067,8 @@ old way, put the following line into your Vim startup file: >
All (exported) public types declared in `java.lang` are always automatically All (exported) public types declared in `java.lang` are always automatically
imported and available as simple names. To highlight them, use: > imported and available as simple names. To highlight them, use: >
:let g:java_highlight_java_lang_ids = 1 :let g:java_highlight_java_lang_ids = 1
You can also generate syntax items for other public and protected types and
You can also highlight types of most standard Java packages if you download opt in to highlight some of their names see |java-package-info-url|.
the javaid.vim script at http://www.fleiner.com/vim/download.html. If you
prefer to only highlight types of a certain package, say `java.io`, use the
following: >
:let g:java_highlight_java_io = 1
Check the javaid.vim file for a list of all the packages that are supported.
Headers of indented function declarations can be highlighted (along with parts Headers of indented function declarations can be highlighted (along with parts
of lambda expressions and method reference expressions), but it depends on how of lambda expressions and method reference expressions), but it depends on how
@ -2226,7 +2221,8 @@ The supported JEP numbers are to be drawn from this table:
Note that as soon as the particular preview feature will have been integrated 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 into the Java platform, its entry will be removed from the table and related
optionality will be discontinued. optionality will be discontinued.
*java-package-info-url*
https://github.com/zzzyxwvut/java-vim/blob/42cbd51/tools/javaid/src/javaid/package-info.java
JSON *json.vim* *ft-json-syntax* *g:vim_json_conceal* JSON *json.vim* *ft-json-syntax* *g:vim_json_conceal*
*g:vim_json_warnings* *g:vim_json_warnings*

View File

@ -8580,6 +8580,7 @@ i} motion.txt /*i}*
j motion.txt /*j* j motion.txt /*j*
java-cinoptions indent.txt /*java-cinoptions* java-cinoptions indent.txt /*java-cinoptions*
java-indenting indent.txt /*java-indenting* java-indenting indent.txt /*java-indenting*
java-package-info-url syntax.txt /*java-package-info-url*
java.vim syntax.txt /*java.vim* java.vim syntax.txt /*java.vim*
javascript-cinoptions indent.txt /*javascript-cinoptions* javascript-cinoptions indent.txt /*javascript-cinoptions*
javascript-indenting indent.txt /*javascript-indenting* javascript-indenting indent.txt /*javascript-indenting*

View File

@ -3,7 +3,7 @@
" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com>
" Former Maintainer: Claudio Fleiner <claudio@fleiner.com> " Former Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Repository: https://github.com/zzzyxwvut/java-vim.git " Repository: https://github.com/zzzyxwvut/java-vim.git
" Last Change: 2025 Apr 28 " Last Change: 2025 May 30
" Please check ":help java.vim" for comments on some of the options " Please check ":help java.vim" for comments on some of the options
" available. " available.
@ -301,9 +301,7 @@ if exists("g:java_highlight_all") || exists("g:java_highlight_java") || exists("
hi def link javaLangObject javaConstant hi def link javaLangObject javaConstant
endif endif
if filereadable(expand("<sfile>:p:h") . "/javaid.vim") runtime syntax/javaid.vim
source <sfile>:p:h/javaid.vim
endif
if exists("g:java_space_errors") if exists("g:java_space_errors")
if !exists("g:java_no_trail_space_error") if !exists("g:java_no_trail_space_error")