1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 00:30:05 +08:00

docs(runner): add custom runner section

This commit is contained in:
wsdjeg 2022-10-22 00:14:13 +08:00
parent b488dd5aeb
commit cb3e1e1807

View File

@ -88,6 +88,7 @@ description: "General documentation about how to use SpaceVim, including the qui
- [Replace text with iedit](#replace-text-with-iedit)
- [iedit states key bindings](#iedit-states-key-bindings)
- [Code runner](#code-runner)
- [Custom runner](#custom-runner)
- [REPL(read eval print loop)](#replread-eval-print-loop)
- [Highlight current symbol](#highlight-current-symbol)
- [Error handling](#error-handling)
@ -2398,6 +2399,20 @@ Key bindings within code runner buffer:
| `ctrl-c` | stop code runner |
| `i` | open promote to insert text |
#### Custom runner
If you want to set custom code runner for specific language. You need to use `SpaceVim#plugins#runner#reg_runner(ft, runner)` api in bootstrap function.
example:
```vim
call SpaceVim#plugins#runner#reg_runner('lua', {
\ 'exe' : 'lua',
\ 'opt' : ['-'],
\ 'usestdin' : 1,
\ })
```
### REPL(read eval print loop)
The REPL(Read Eval Print Loop) plugin provides a framework to run REPL command asynchronously.