@@ -48,6 +48,7 @@ The current list of defaults by filetype is:
4848 * python: autopep8, black, yapf
4949 * rust: rustfmt
5050 * sh: shfmt
51+ * swift: swift-format
5152
5253==============================================================================
5354CONFIGURATION *codefmt-config*
@@ -93,6 +94,10 @@ Default: 'yapf' `
9394The path to the black executable.
9495Default: 'black' `
9596
97+ *codefmt:isort_executable*
98+ The path to the isort executable.
99+ Default: 'isort' `
100+
96101 *codefmt:gn_executable*
97102The path to the gn executable.
98103Default: 'gn' `
@@ -101,6 +106,34 @@ Default: 'gn' `
101106The path to the buildifier executable.
102107Default: 'buildifier' `
103108
109+ *codefmt:buildifier_lint_mode*
110+ The lint_mode for buildifier. passed to buildifier --lint parameter.
111+
112+ Options:
113+ "" (empty): Use default from buildifier.
114+ "Off": Do not fix issues.
115+ "Fix": Fix issues automatically during formatting.
116+ "Warn": Format only if there are no issues; if there are issues, it will cause
117+ an error and do no formatting.
118+ Default: '' `
119+
120+ *codefmt:buildifier_warnings*
121+ The warnings options passed to buildifier to modify the defaults. Whatever is
122+ specified is added to the commandline after "--warnings=". For example, if you
123+ add this to your config:
124+ >
125+ Glaive codefmt buildifier_warnings='-module-docstring,+unsorted-dict-items'
126+ <
127+ Then buildifier will omit the "module-docstring" warning, but add
128+ "unsorted-dict-items" (which is ignored by default). This works also in
129+ fix-mode, in which case dictionary items will be resorted upon buffer save.
130+
131+ Options:
132+ "" (empty): Use default warnings from buildifier.
133+ "-some-warning": Remove 'some-warning' from the warning set.
134+ "+some-warning": Add 'some-warning' to the warning set.
135+ Default: '' `
136+
104137 *codefmt:google_java_executable*
105138The path to the google-java executable. Generally, this should have the form:
106139`java -jar /path/to/google-java`
@@ -134,6 +167,10 @@ Command line arguments to feed prettier. Either a list or callable that takes
134167no args and returns a list with command line arguments.
135168Default: [] `
136169
170+ *codefmt:swift_format_executable*
171+ The path to the swift-format executable.
172+ Default: 'swift-format' `
173+
137174 *codefmt:prettier_executable*
138175The path to the prettier executable. String, list, or callable that takes no
139176args and returns a string or a list. The default uses npx if available, so
0 commit comments