andersch.dev

<2023-04-07 Fri>

Neovim

Neovim is a reimplementation of the Vim text editor.

Features:

Embedding Neovim

According to neovim documentation:

–embed

Use stdin/stdout as a msgpack-RPC channel, so applications can embed and control Nvim via the RPC |API|.

Waits for the client ("embedder") to call |nvimuiattach()| before sourcing startup files and reading buffers, so that UIs can deterministically handle (display) early messages, dialogs, etc. The client can do other requests before `nvimuiattach` (e.g. `nvimgetapiinfo` for feature-detection). During this pre-startup phase the user config is of course not available (similar to `–cmd`).

Embedders not using the UI protocol must pass YXXY–headless|:

nvim –embed –headless

Then startup will continue without waiting for `nvimuiattach`. This is equivalent to:

nvim –headless –cmd "call stdioopen({'rpc': v:true})"

See also: |ui-startup| |channel-stdio|