aboutsummaryrefslogtreecommitdiff
path: root/scripts/luacats_parser.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-06-21 10:34:59 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-06-21 11:03:47 +0200
commit7306adaebc486deacf67b25a17a35272bb4b494e (patch)
treeac855071b1f8a15ccee3243d7e869067669d85fb /scripts/luacats_parser.lua
parent1db1476fd98a161df112863dbc87334394083341 (diff)
downloadrneovim-7306adaebc486deacf67b25a17a35272bb4b494e.tar.gz
rneovim-7306adaebc486deacf67b25a17a35272bb4b494e.tar.bz2
rneovim-7306adaebc486deacf67b25a17a35272bb4b494e.zip
vim-patch:beb02ed: runtime(java): Optionally highlight parameterised types
In the presence of parameterised types whose names begin with a capital letter and end with a less-than sign "<" that introduces a type argument or a list of comma-separated type arguments, followed by a greater-than sign ">", a variable "g:java_highlight_generics" can be defined to have some components of such types uniformly coloured (by picking highlight groups for javaGenericsC{1,2}, javaWildcardBound). For example, ------------------------------------------------------------ java.io.InputStream stream = java.io.InputStream.nullInputStream(); java.util.function.Function<String, java.util.function.BiFunction<String, String, String>> updater = property -> (oldValue, newValue) -> oldValue; java.util.logging.LogManager.getLogManager() .updateConfiguration(stream, updater); ------------------------------------------------------------ Note that the diamond form and explicit type arguments do not qualify for this kind of recognition. For example, ------------------------------------------------------------ new java.util.HashSet<>().<String>toArray(new String[0]); ------------------------------------------------------------ References: https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.5 https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.9 https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.12.2.1 closes: vim/vim#15050 https://github.com/vim/vim/commit/beb02ed674bc61f179c4ff71e93bdeeb44fe9c4e Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Diffstat (limited to 'scripts/luacats_parser.lua')
0 files changed, 0 insertions, 0 deletions