@@ -42,60 +42,67 @@ pub(crate) struct Args {
42
42
#[ arg( default_value = "." ) ]
43
43
pub ( crate ) path : Vec < std:: path:: PathBuf > ,
44
44
45
+ /// The approximate number of threads to use.
46
+ #[ arg( short = 'j' , long = "threads" , default_value = "0" ) ]
47
+ pub ( crate ) threads : usize ,
48
+
45
49
/// Custom config file
46
- #[ arg( short = 'c' , long = "config" ) ]
50
+ #[ arg( short = 'c' , long = "config" , help_heading = "Config" ) ]
47
51
pub ( crate ) custom_config : Option < std:: path:: PathBuf > ,
48
52
49
53
/// Ignore implicit configuration files.
50
- #[ arg( long) ]
54
+ #[ arg( long, help_heading = "Config" ) ]
51
55
pub ( crate ) isolated : bool ,
52
56
57
+ #[ command( flatten, next_help_heading = "Config" ) ]
58
+ pub ( crate ) config : ConfigArgs ,
59
+
53
60
/// Print a diff of what would change
54
- #[ arg( long, group = "mode" ) ]
61
+ #[ arg( long, group = "mode" , help_heading = "Mode" ) ]
55
62
pub ( crate ) diff : bool ,
56
63
57
64
/// Write fixes out
58
- #[ arg( long, short = 'w' , group = "mode" ) ]
65
+ #[ arg( long, short = 'w' , group = "mode" , help_heading = "Mode" ) ]
59
66
pub ( crate ) write_changes : bool ,
60
67
61
68
/// Debug: Print each file that would be spellchecked.
62
- #[ arg( long, group = "mode" ) ]
69
+ #[ arg( long, group = "mode" , help_heading = "Mode" ) ]
63
70
pub ( crate ) files : bool ,
64
71
65
72
/// Debug: Print each file's type
66
- #[ arg( long, group = "mode" ) ]
73
+ #[ arg( long, group = "mode" , help_heading = "Mode" ) ]
67
74
pub ( crate ) file_types : bool ,
68
75
69
76
/// Debug: Print each identifier that would be spellchecked.
70
- #[ arg( long, group = "mode" ) ]
77
+ #[ arg( long, group = "mode" , help_heading = "Mode" ) ]
71
78
pub ( crate ) identifiers : bool ,
72
79
73
80
/// Debug: Print each word that would be spellchecked.
74
- #[ arg( long, group = "mode" ) ]
81
+ #[ arg( long, group = "mode" , help_heading = "Mode" ) ]
75
82
pub ( crate ) words : bool ,
76
83
77
84
/// Write the current configuration to file with `-` for stdout
78
- #[ arg( long, group = "mode" ) ]
85
+ #[ arg( long, group = "mode" , help_heading = "Mode" ) ]
79
86
pub ( crate ) dump_config : Option < std:: path:: PathBuf > ,
80
87
81
88
/// Show all supported file types.
82
- #[ arg( long, group = "mode" ) ]
89
+ #[ arg( long, group = "mode" , help_heading = "Mode" ) ]
83
90
pub ( crate ) type_list : bool ,
84
91
85
- #[ arg( long, value_enum, ignore_case = true , default_value( "long" ) ) ]
92
+ /// Render style for messages
93
+ #[ arg(
94
+ long,
95
+ value_enum,
96
+ ignore_case = true ,
97
+ default_value( "long" ) ,
98
+ help_heading = "Output"
99
+ ) ]
86
100
pub ( crate ) format : Format ,
87
101
88
- /// The approximate number of threads to use.
89
- #[ arg( short = 'j' , long = "threads" , default_value = "0" ) ]
90
- pub ( crate ) threads : usize ,
91
-
92
- #[ command( flatten) ]
93
- pub ( crate ) config : ConfigArgs ,
94
-
95
- #[ command( flatten) ]
102
+ #[ command( flatten, next_help_heading = "Output" ) ]
96
103
pub ( crate ) color : colorchoice_clap:: Color ,
97
104
98
- #[ command( flatten) ]
105
+ #[ command( flatten, next_help_heading = "Output" ) ]
99
106
pub ( crate ) verbose : clap_verbosity_flag:: Verbosity ,
100
107
}
101
108
@@ -126,6 +133,7 @@ pub(crate) struct FileArgs {
126
133
#[ arg( long, overrides_with( "unicode" ) ) ]
127
134
no_unicode : bool ,
128
135
136
+ /// Language locale to suggest corrections for
129
137
#[ arg( long) ]
130
138
#[ arg(
131
139
value_parser = clap:: builder:: PossibleValuesParser :: new( config:: Locale :: variants( ) )
0 commit comments