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

@ -0,0 +1,20 @@
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48
|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|3|(|)| |{+0#0000001#ffff4012| +0#0000000#ffffff0@54
||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|}+0#0000001#ffff4012| +0#0000000#ffffff0@67
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48
|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|4|(|)| |{+0#0000001#ffff4012| +0#0000000#ffffff0@54
||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3>/+0#0000e05&|*|/|\|/|\|/|\|*|/| +0#0000000&|;| |}+0#0000001#ffff4012| +0#0000000#ffffff0@54
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
|-+0#0000e05#a8a8a8255| | +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| | +0&#ffffff0@3|/@2| +0#0000000&@65
||+0#0000e05#a8a8a8255| | +0&#ffffff0@3|/@2| +0#0000000&@65
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|5|(|)| |{+0#0000001#ffff4012| +0#0000000#ffffff0|}+0#0000001#ffff4012| +0#0000000#ffffff0@52
| +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|6|(|)| @56
|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|{+0#0000001#ffff4012| +0#0000000#ffffff0@67
||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|}+0#0000001#ffff4012| +0#0000000#ffffff0@67
| +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| | +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|7|(|)| |{+0#0000001#ffff4012| +0#0000000#ffffff0@54
||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|}+0#0000001#ffff4012| +0#0000000#ffffff0@67
| +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
@57|1|0|9|,|2|-|5| @6|8|1|%|