aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-07-18 13:31:23 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2018-09-18 19:22:16 +0200
commitbd8d43c6fef868ad5ed50a79deb0f7adc1f5e53a (patch)
tree1798c2487a0a84ae7e98ac5d61906ca21742601e /runtime
parent32ad52ae04d3fea1fa84594b9b13ee1442a410ca (diff)
downloadrneovim-bd8d43c6fef868ad5ed50a79deb0f7adc1f5e53a.tar.gz
rneovim-bd8d43c6fef868ad5ed50a79deb0f7adc1f5e53a.tar.bz2
rneovim-bd8d43c6fef868ad5ed50a79deb0f7adc1f5e53a.zip
startup: wait for embedder before executing startup commands and files
Give embeders a chance to set up nvim, by processing a request before startup. This allows an external UI to show messages and prompts from --cmd and buffer loading (e.g. swap files)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/starting.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 3440131642..275b08b5dd 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -349,7 +349,16 @@ argument.
*--embed*
--embed Use stdin/stdout as a msgpack-RPC channel, so applications can
embed and control Nvim via the |rpc-api|. Implies |--headless|.
- Equivalent to: >
+
+ Nvim will wait for a single request before sourcing startup
+ files and reading buffers. This is mainly so that UIs can call
+ `nvim_ui_attach` so that the UI can show startup messages
+ and possible swap file dialog for the first loaded file. In
+ addition, a `nvim_get_api_info` call before the `nvim_ui_attach`
+ call is also allowed, so that UI features can be safely
+ detected by the UI.
+
+ To avoid this behavior, this alterative could be used instead: >
nvim --headless --cmd "call stdioopen({'rpc': v:true})"
<
See also |channel-stdio|.