view runtime/syntax/testdir/dumps/java_methods_indent4_00.dump @ 35434:5fc5b71e2551

runtime(java): Fold multi-line comments with the syntax kind of &fdm (#15016) Commit: https://github.com/vim/vim/commit/371bab05947b32f26d1b32922e5dc38343a875bc Author: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com> Date: Sun Jun 16 09:42:55 2024 +0300 runtime(java): Fold multi-line comments with the syntax kind of &fdm (https://github.com/vim/vim/issues/15016) Also: - Restore the capability to mark as an error braces nested in parens with g:javaInParen. - Try not to fold top-level-type bodies. (Defining multiple package-private top level types in a single source file is not recommended as it can impose order among compilation units; so it is assumed that only one such top level type is usually defined.) - Compose ?method header? highlighting and block braces folding. - Do not highlight block braces whenever ?method header? highlighting is requested. This bundling of ?method headers? and block braces for highlighting can be traced back to Vim v5.0; however, no comment or documentation entry conveys any justification. For example, it is hard to discover the connection between block braces for "while", "if", etc., statements and method body block braces. The former behaviour can be attained in, e.g. ~/.vim/after/syntax/java.vim: ------------------------------------------------------------ if exists("g:java_highlight_functions") syn clear javaBlock javaInParen syn match javaBlockOther "[{}]" syn region javaBlock transparent matchgroup=javaBlockStart \ start="\%(^\|^\S[^:]\+\)\@120<!{" end="}" fold hi def link javaBlockStart javaFuncDef hi def link javaBlockOther javaBlockStart if exists("g:java_mark_braces_in_parens_as_errors") syn match javaInParen contained "[{}]" endif endif ------------------------------------------------------------ Note: Read ?a method header omitting a _throws_ clause? for every ?method header? appellation used above. Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 16 Jun 2024 08:45:13 +0200
parents c30ec6598fc9
children 15e88eae39bd
line wrap: on
line source

>/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|f|u|n|c|t|i|o|n|s| |=| |'|i|n|d|e|n|t|4|'| +0#0000000&@14
|/+0#0000e05&@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t| |e|n|c|o|d|i|n|g|=|u|t|f|-|8| |t|e|r|m|e|n|c|o|d|i|n|g|=|u|t|f|-|8| +0#0000000&@19
@75
|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|E|l|e|m|e|n|t|T|y|p|e|;| @34
|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|T|a|r|g|e|t|;| @39
@75
|a+0#4040ff13&|b|s|t|r|a|c|t| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|I|n|d|e|n|t|4|M|e|t|h|o|d|s|T|e|s|t|s| @40
|{| |/+0#0000e05&@1| |D|O| |N|O|T| |r|e|t|a|b|!| |T|H|I|S| |F|I|L|E|;| |R|E|M|E|M|B|E|R| |A|B|O|U|T| |t|e|s|t|d|i|r|/|f|t|p|l|u|g|i|n|.| +0#0000000&@12
@4|/+0#0000e05&@1| |T|Y|P|E|S|.| +0#0000000&@61
@4|r+0#00e0003&|e|c|o|r|d| +0#0000000&|Τ|ʬ|<|α|>|(|α| |a|)| |{| |}| @49
@75
@4|e+0#00e0003&|n|u|m| +0#0000000&|E| @64
@4|{| @69
@8|A|(|"+0#e000002&|a|"|)+0#0000000&|,| |B|(|"+0#e000002&|b|"|)+0#0000000&|,| |C|(|"+0#e000002&|c|"|)+0#0000000&|,| |D|(|"+0#e000002&|d|"|)+0#0000000&|,| @35
@8|E|(|"+0#e000002&|e|"|)+0#0000000&|,| |F|(|"+0#e000002&|f|"|)+0#0000000&|,| |G|(|"+0#e000002&|g|"|)+0#0000000&|,| |H|(|"+0#e000002&|h|"|)+0#0000000&|;| @35
@8|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |s|;| @51
@8|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|E|(|S|t|r|i|n|g| |s|)| |{| |t+0#00e0003&|h|i|s|.+0#0000000&|s| |=| |s|;| |}| @31
@4|}| @69
@75
@57|1|,|1| @10|T|o|p|