@@ -50,6 +50,7 @@ The current list of defaults by filetype is:
5050 * nix: nixpkgs-fmt
5151 * ocaml: ocamlformat
5252 * python: autopep8, black, yapf
53+ * ruby: rubocop
5354 * rust: rustfmt
5455 * sh: shfmt
5556 * swift: swift-format
@@ -183,6 +184,10 @@ Default: [] `
183184The path to the swift-format executable.
184185Default: 'swift-format' `
185186
187+ *codefmt:rubocop_executable*
188+ The path to the Rubocop executable.
189+ Default: 'rubocop' `
190+ 186191 *codefmt:prettier_executable*
187192The path to the prettier executable. String, list, or callable that takes no
188193args and returns a string or a list. The default uses npx if available, so
@@ -383,7 +388,8 @@ codefmt#formatterhelpers#Format({cmd}) *codefmt#formatterhelpers#Format()*
383388 Throws ERROR(ShellError) if the {cmd} system call fails
384389
385390codefmt#formatterhelpers#AttemptFakeRangeFormatting({startline} , {endline} ,
386- {cmd} , {ignoreerrors} , {skipfirstnlines} ) *codefmt#formatterhelpers#AttemptFakeRangeFormatting()*
391+ {cmd} , [ignoreerrors] , [skipfirstnlines] )
392+ *codefmt#formatterhelpers#AttemptFakeRangeFormatting()*
387393 Attempt to format a range of lines from {startline} to {endline} in the
388394 current buffer via a formatter that doesn't natively support range
389395 formatting, which is invoked via {cmd} (a system call represented by either
@@ -396,7 +402,18 @@ codefmt#formatterhelpers#AttemptFakeRangeFormatting({startline}, {endline},
396402 the tool for range formatting and post a URL for that feature request above
397403 code that calls it.
398404
399- Throws ERROR(ShellError) if the {cmd} system call fails
405+ If [ignoreerrors] is nonzero, the syscall ignores errors. This can be
406+ helpful for formatters that return nonzero results for reasons unrelated to
407+ formatting.
408+ 409+ If [skipfirstnlines] is set to a nonzero number N, the first N lines of the
410+ formatter output are trimmed. This can be used to trim always-present
411+ headers.
412+ 413+ [ignoreerrors] is 0 if omitted.
414+ [skipfirstnlines] is 0 if omitted.
415+ Throws ERROR(ShellError) if the {cmd} system call fails (and [ignoreerrors]
416+ is 0)
400417 Throws ERROR(WrongType)
401418
402419codefmt#formatterhelpers#ResolveFlagToArray({flag_name})
0 commit comments