runtime(java): Make the bundled &foldtext function optional
- Obtain and pass through translated messages with this
function.
- If "g:java_foldtext_show_first_or_second_line" is defined,
assign this function to &foldtext.
closes: #15549
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 68ea21e..736e664 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.1. Last change: 2024 Aug 13
+*syntax.txt* For Vim version 9.1. Last change: 2024 Aug 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2135,6 +2135,14 @@
Numbers and strings can be recognized in non-Javadoc comments with >
:let g:java_comment_strings = 1
+When 'foldmethod' is set to "syntax", blocks of code and multi-line comments
+will be folded. No text is usually written in the first line of a multi-line
+comment, making folded contents of Javadoc comments less informative with the
+default 'foldtext' value; you may opt for showing the contents of a second
+line for any comments written in this way, and showing the contents of a first
+line otherwise, with >
+ :let g:java_foldtext_show_first_or_second_line = 1
+
Trailing whitespace characters or a run of space characters before a tab
character can be marked as an error with >
:let g:java_space_errors = 1