mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 23:10:06 +08:00
docs(neoformat): update :h neoformat
This commit is contained in:
parent
ad5b9e5496
commit
f74d1c057a
@ -90,21 +90,22 @@ let g:neoformat = 1
|
|||||||
" Define custom formatters.
|
" Define custom formatters.
|
||||||
"
|
"
|
||||||
" Options:
|
" Options:
|
||||||
"
|
" 1. `exe`: the name the formatter executable in the path, required
|
||||||
" | `exe` | the name the formatter executable in the path | required
|
" 2. `args`: list of arguments, default: [], optional
|
||||||
" | `args` | list of arguments | default: [] | optional
|
" 3. `replace`: overwrite the file, instead of updating the buffer, default: 0, optional
|
||||||
" | `replace` | overwrite the file, instead of updating the buffer | default: 0 | optional
|
" 4. `stdin`: send data to the stdin of the formatter, default 0, optional
|
||||||
" | `stdin` | send data to the stdin of the formatter | default 0 | optional
|
" 5. `stderr`: used to specify whether stderr output should be read along with
|
||||||
" | `stderr` | used to specify whether stderr output should be read along with
|
" the stdin, otherwise redirects stderr to `stderr.log` file in neoformat's
|
||||||
" the stdin, otherwise redirects stderr to `stderr.log` file in neoformat's
|
" temporary directory, default 0, optional
|
||||||
" temporary directory | default 0 | optional
|
" 6. `no_append`: do not append the `path` of the file to the formatter command,
|
||||||
" | `no_append` | do not append the `path` of the file to the formatter command,
|
" used when the `path` is in the middle of a command, default: 0, optional
|
||||||
" used when the `path` is in the middle of a command | default: 0 |
|
" 7. `env`: list of environment variables to prepend to the command, default: [], optional
|
||||||
" optional
|
" 8. `valid_exit_codes`: list of valid exit codes for formatters who do not
|
||||||
" | `env` | list of environment variables to prepend to the command | default: [] | optional
|
" respect common unix practices, default is [0], optional
|
||||||
"
|
" 9. `try_node_exe`: attempt to find `exe` in a `node_modules/.bin` directory
|
||||||
" | `valid_exit_codes` | list of valid exit codes for formatters who do not respect common unix practices | \[0] | optional
|
" in the current working directory or one of its parents (requires setting
|
||||||
" | `try_node_exe` | attempt to find `exe` in a `node_modules/.bin` directory in the current working directory or one of its parents (requires setting `g:neoformat_try_node_exe`) | default: 0 | optional
|
" `g:neoformat_try_node_exe`), default: 0, optional
|
||||||
|
" 10. `output_encode`: set the output encoding of formatter, default is `utf-8`
|
||||||
"
|
"
|
||||||
" Example:
|
" Example:
|
||||||
"
|
"
|
||||||
|
@ -83,23 +83,26 @@ CONFIGURATION *neoformat-config*
|
|||||||
Define custom formatters.
|
Define custom formatters.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
1. `exe`: the name the formatter executable in the path, required
|
||||||
| `exe` | the name the formatter executable in the path | required |
|
2. `args`: list of arguments, default: [], optional
|
||||||
`args` | list of arguments | default: [] | optional | `replace` |
|
3. `replace`: overwrite the file, instead of updating the buffer, default:
|
||||||
overwrite the file, instead of updating the buffer | default: 0 | optional |
|
0, optional
|
||||||
`stdin` | send data to the stdin of the formatter | default 0 | optional |
|
4. `stdin`: send data to the stdin of the formatter, default 0, optional
|
||||||
`stderr` | used to specify whether stderr output should be read along with
|
5. `stderr`: used to specify whether stderr output should be read along with
|
||||||
the stdin, otherwise redirects stderr to `stderr.log` file in neoformat's
|
the stdin, otherwise redirects stderr to `stderr.log` file in neoformat's
|
||||||
temporary directory | default 0 | optional | `no_append` | do not append the
|
temporary directory, default 0, optional
|
||||||
`path` of the file to the formatter command, used when the `path` is in
|
6. `no_append`: do not append the `path` of the file to the formatter
|
||||||
the middle of a command | default: 0 | optional | `env` | list of
|
command, used when the `path` is in the middle of a command, default: 0,
|
||||||
environment variables to prepend to the command | default: [] | optional
|
optional
|
||||||
|
7. `env`: list of environment variables to prepend to the command, default:
|
||||||
| `valid_exit_codes` | list of valid exit codes for formatters who do not
|
[], optional
|
||||||
respect common unix practices | \[0] | optional | `try_node_exe` | attempt to
|
8. `valid_exit_codes`: list of valid exit codes for formatters who do not
|
||||||
find `exe` in a `node_modules/.bin` directory in the current working directory
|
respect common unix practices, default is [0], optional
|
||||||
or one of its parents (requires setting `g:neoformat_try_node_exe`) | default:
|
9. `try_node_exe`: attempt to find `exe` in a `node_modules/.bin` directory
|
||||||
0 | optional
|
in the current working directory or one of its parents (requires setting
|
||||||
|
`g:neoformat_try_node_exe`), default: 0, optional
|
||||||
|
10. `output_encode`: set the output encoding of formatter, default is
|
||||||
|
`utf-8`
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user