runtime(java): Fold adjacent "import" declarations

Also, distinguish (by abbreviating their names) and manage
foldable kinds of syntax items: blocks of code ("b"), plain
comments ("c"), Javadoc comments ("d"), adjacent "import"
declarations ("i").  Fold all qualifying items by default;
otherwise, do not fold items of explicitly delisted kinds.
For example,
------------------------------------------------------------
	let g:java_ignore_folding = "bcdi"
------------------------------------------------------------

Resolves zzzyxwvut/java-vim#12.

closes: #18492

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Aliaksei Budavei
2025-10-08 16:45:28 +00:00
committed by Christian Brabandt
parent 97d1255558
commit 143686b3c4
22 changed files with 438 additions and 258 deletions

View File

@ -1,20 +1,20 @@
|/+0#0000e05#ffffff0|*| |1|2@1|||.@67
@20|*|/| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|U|n|f|o|l|d|e|n|a|b|l|e| |{+0#00e0003&| +0#0000000&@27
>}+0#00e0003&| +0#0000000&@73
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|2@1|,|1| @8|B|o|t|
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@2| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@51
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|8|(|)| |{+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*|/|\|/|\|/|\|*|/| +0#0000000&|;| |}+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#0000e05#a8a8a8255@1|}+0#00e0003#ffffff0| +0#0000000&@71
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1>/+0&#ffffff0|*| +0#0000000&@70
| +0#0000e05#a8a8a8255@1| +0&#ffffff0|*| |S|o|m|e| |n|o|t|e|.| +0#0000000&@59
| +0#0000e05#a8a8a8255@1| +0&#ffffff0|*| |{| +0#0000000&@68
| +0#0000e05#a8a8a8255@1| +0&#ffffff0|*| |}| +0#0000000&@68
| +0#0000e05#a8a8a8255@1| +0&#ffffff0|*|/| +0#0000000&@69
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0|*@1| +0#0000000&@69
| +0#0000e05#a8a8a8255@1| +0&#ffffff0|*| +0#e000e06&|A| |s|u|m@1|a|r|y|.| +0#0000000&@59
| +0#0000e05#a8a8a8255@1| +0&#ffffff0|*| |{| +0#0000000&@68
| +0#0000e05#a8a8a8255@1| +0&#ffffff0|*| |}| +0#0000000&@68
| +0#0000e05#a8a8a8255@1| +0&#ffffff0|*|/| +0#0000000&@69
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@2| +0#e000e06&|A| |s|u|m@1|a|r|y|.| +0#0000000&@58
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@2| +0#0000000&|{+0#0000e05&| +0#0000000&@67
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@2| +0#0000000&|}+0#0000e05&| +0#0000000&@67
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| +0#0000000&@70
@57|1|2|7|,|1| @8|9|6|%|