Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6ee1e7e

Browse files
committed
Fix minor vimdoc errors after #220 and regen docfiles
1 parent f30608c commit 6ee1e7e

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

‎autoload/codefmt/formatterhelpers.vim‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ endfunction
7575

7676
""
7777
" @public
78-
" @usage startline endline cmd \[ignoreerrors] \[skipfirstnlines]
7978
" Attempt to format a range of lines from {startline} to {endline} in the
8079
" current buffer via a formatter that doesn't natively support range
8180
" formatting, which is invoked via {cmd} (a system call represented by either
@@ -90,10 +89,14 @@ endfunction
9089
"
9190
" If [ignoreerrors] is nonzero, the syscall ignores errors. This can be helpful
9291
" for formatters that return nonzero results for reasons unrelated to
93-
" formatting. If [skipfirstnlines] is set to a nonzero number N, the first
92+
" formatting.
93+
"
94+
" If [skipfirstnlines] is set to a nonzero number N, the first
9495
" N lines of the formatter output are trimmed. This can be used to trim
9596
" always-present headers.
9697
"
98+
" @default ignoreerrors=0
99+
" @default skipfirstnlines=0
97100
" @throws ShellError if the {cmd} system call fails (and [ignoreerrors] is 0)
98101
" @throws WrongType
99102
function! codefmt#formatterhelpers#AttemptFakeRangeFormatting(

‎doc/codefmt.txt‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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: [] `
183184
The path to the swift-format executable.
184185
Default: 'swift-format' `
185186

187+
*codefmt:rubocop_executable*
188+
The path to the Rubocop executable.
189+
Default: 'rubocop' `
190+
186191
*codefmt:prettier_executable*
187192
The path to the prettier executable. String, list, or callable that takes no
188193
args 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

385390
codefmt#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

402419
codefmt#formatterhelpers#ResolveFlagToArray({flag_name})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /