Commit c6d0382d by HiPhish

Add 'spawn' setting to REPLs

parent 1f029dc0
......@@ -138,9 +138,9 @@ instead of deciding ahead of time.
Note After Nvim has loaded up do not re-assign the `g:repl` variable, set its
individual entries instead.
It is also possible to specify local setting by using one of the scopes `t:`, `w:`
or `b:`, with later ones taking precedence. The following is a listing of the
default settings.
It is also possible to specify local settings by using one of the scopes `t:`,
`w:` or `b:`, with later ones taking precedence. The following is a listing of
the default settings.
Note The |repl#define_repl()| function provides a safe way of defining or
modifying the entries of `g:repl`.
......@@ -158,17 +158,24 @@ before the user-supplied arguments.
------------------------------------------------------------------------------
g:repl['type']['syntax'] *g:repl['type']['syntax']*
Default: 'scheme'~
Which syntax highlighting to use for the REPL. Use the empty string if you
wish to disable syntax highlighting.
------------------------------------------------------------------------------
:repl['type']['title'] *g:repl['type']['title']*
Default: 'Guile REPL'~
g:repl['type']['title'] *g:repl['type']['title']*
The value used for the terminal buffer's `b:term_title` variable.
------------------------------------------------------------------------------
g:repl['type']['spawn'] *g:repl['type']['spawn']*
Optional, defaults to |repl#spawn()|; this function opens a new buffer and
sets up the REPL process. See |repl#spawn()| for details.
This option is intended for REPLs which do something special, like not using
the terminal. For most REPLs the default is exactly what you want to use.
==============================================================================
MANAGING REPL INSTANCES *repl.nvim-setup*
......
......@@ -109,7 +109,11 @@ function! s:repl(mods, bang, ...)
" first argument, that is the file type)
let l:repl.args = l:repl.args + a:000[1:]
let l:instance = repl#spawn(a:mods, l:repl, l:type)
if has_key(l:repl, 'spawn')
let l:instance = l:repl.spawn(a:mods, l:repl, l:type)
else
let l:instance = repl#spawn(a:mods, l:repl, l:type)
endif
call s:register_instance(l:instance)
endfunction
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment